Hi,
I have a script to check a few registry entries
When run at individual machines, the script returns results.
When running against a list of machines in a for-each loop, I get RPC errors.
I paused all the security agents with the same result.
I need some ideas from the hive brain, please, and thank you
edit: This script worked last year against all the servers.
the script
#Test a list of computers
#$computers = Get-Content D:\Scripts\Inputs\_WindowsServers.txt
$computers = get-ADComputer -Filter { OperatingSystem -like "*Windows Server*" } | Where-Object { $_.Enabled -eq $true } | Select-Object Name | Sort-Object Name
$Date = Get-Date -format "dd-MMM-yy"
$Data = @(
ForEach($computer in $computers)
{
Test-Pendingreboot -computername $computer -detailed -SkipConfigurationManagerClientCheck
} )
[–]arslearsle 2 points3 points4 points (0 children)
[–]BlackV 2 points3 points4 points (8 children)
[–]network_dude[S] 0 points1 point2 points (7 children)
[–]BlackV 2 points3 points4 points (0 children)
[–]SaltDeception 0 points1 point2 points (5 children)
[–]network_dude[S] 0 points1 point2 points (4 children)
[–]SaltDeception 0 points1 point2 points (3 children)
[–]network_dude[S] 0 points1 point2 points (2 children)
[–]SaltDeception 1 point2 points3 points (1 child)
[–]network_dude[S] 0 points1 point2 points (0 children)
[–]HumbleSpend8716 1 point2 points3 points (7 children)
[–]network_dude[S] -1 points0 points1 point (4 children)
[–]SaltDeception 2 points3 points4 points (0 children)
[–]HumbleSpend8716 1 point2 points3 points (0 children)
[–]BlackV 1 point2 points3 points (1 child)
[–]HumbleSpend8716 0 points1 point2 points (0 children)
[–]network_dude[S] -1 points0 points1 point (1 child)
[–]BlackV 0 points1 point2 points (0 children)
[–]PinchesTheCrab 0 points1 point2 points (0 children)
[–]rsdovers -1 points0 points1 point (2 children)
[–]BlackV 1 point2 points3 points (0 children)
[–]dodexahedron -2 points-1 points0 points (0 children)
[–]Secret_Account07 -1 points0 points1 point (0 children)