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
#Get the list of servers. | |
$serverList = Get-Content -Path .\servers.txt | |
#Loop through each. | |
foreach($server in $serverList) { | |
#Get the contents of the netlogon file. | |
$netlogonContent = Get-Content -Path \\$server\C$\Windows\debug\netlogon.log -Tail 5 | |
#Boolean to only write the server name once if at all. | |
$serverNameWritten = $false |
NewerOlder