Finally!!! After loading this site into several browsers I find one that allows me to TYPE my post!!!
I don’t know where to find/get the old forums since I think I may have asked this already somewhere.
I want to get and loop through all the servers that PowerShell can find and know about – aka powered-on, check if it’s a Windows server like so:
This is PS 2.0 code, so:
$servers = $servers | foreach ($_name)
If Get-ADComputer - filter {operatingsystem -Like “Windows Server*”}
copy \$server\c$*changelog.txt \foo\backup
end if
next end for (I can find whatever it is that ends a for loop)
That’s the general code. Where I’m stuck is:
-
constructing the for-each loop to get the servers
-
testing the server
Do I have these parts correct??
Thank you, Tom