Created
October 2, 2018 14:08
-
-
Save rileyz/22e964757032ecbd6b8dc9161ef8d8ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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