Created
September 7, 2015 17:41
-
-
Save kvprasoon/c533b08b4eb174ca7bdd to your computer and use it in GitHub Desktop.
ScriptingGamesSep
This file contains 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
$Cred=Get-Credential;import-csv C:\powershell.org\Input.csv|select -ExpandProperty machinename |foreach{new-object psobject -Property @{'MACHIUNENAME'=$_;'OS VERSION'=$(Get-WmiObject -Class win32_operatingsystem -ComputerName $_ -Credential $cred|select -ExpandProperty caption)}}|Export-Csv C:\powershell.org\Output.csv -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment