Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This will prompt for the security Hotfix ID
- $KB = read-host "Enter a hotfixID"
- #
- #List of computers are in CSV format here
- Import-Csv C:\serverlist.csv | foreach {
- $server = $_.Server
- $os = (get-adcomputer -filter "Name -eq '$server'" -Properties OperatingSystem | Select OperatingSystem).OperatingSystem
- [pscustomobject]@{
- Server=$Server
- OS=$OS
- Installed=(Get-HotFix -ComputerName $Server -Id $KB -ErrorAction Ignore) -ne $null
- }
- } | Export-csv C:\results.csv -NoTypeInformation
- #
- #EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement