Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
This works to an extent and populates the text file with servers it is able to locate. For the servers it's unable to locate or obtain the operating system I would like this to be marked with "Not found". At the moment, there is no mention of these servers in the output text file. Essentially something like this;
Get-Content "servers.txt" | Get-ADComputer -Properties Name, OperatingSystem | Select Name, OperatingSystem > ServerOperatingSystems.txt
|Why Is My Script Not Running at Login for Users?||8||28|
|Can I use the same managed account for my new sharepoint farm||3||16|
|Add Manager to Get-ADUser script without the full cn||7||23|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!