If you have any powershell script which is working on your local system and the same want to run over remote hosts and get details. Use below as a solution to your request. The very first line determines how variable for getting hostname is determined. I have created one for getting Operating system details.
$computername = (Read-host 'Enter a computer name')
$computername = (Read-host 'Enter a computer name')
)
get-wmiobject -class
win32_operatingsystem -computer $computername | select-object BuildNumber,
Caption, ServicePackMajorVersion
Regards, Baij
No comments:
Post a Comment