$verbosePreference = 'Continue' | |
$Computers = Import-Csv C:\LocalWhereEver\List_0x87d01290.txt | |
$GatherLogsHere = "C:\LocalWhereEver\0x87d01290_RemoteLogs" | |
Foreach ($Computer in $Computers) | |
{Write-Verbose "Working on $($Computer.Computers)" | |
If (((Test-NetConnection -ComputerName $Computer.Computers -Port 3389).TcpTestSucceeded)) | |
{Write-Verbose ' Computer is awake.' | |
If (Test-Path \\$($Computer.Computers)\C$\Windows\Temp\Fix-ConfigMgrClientError0x87d01290.log) | |
{Copy-Item -Path "\\$($Computer.Computers)\C$\Windows\Temp\Fix-ConfigMgrClientError0x87d01290.log" -Destination "$GatherLogsHere\$($Computer.Computers)_Fix-ConfigMgrClientError0x87d01290.log"}} | |
Else{Write-Verbose ' Unable to contact computer.'}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment