In this post I will show you how to create a HTTPS WinRM listener that is using a certificate issued by your own MS PKI. The requirements are the following: – An Active Directory domain – An Enterprise MS PKI
Play with the Windows Task Scheduler and XML
Get the free space on remote computer disks
List domain controllers forest wide with OS version
This powershell script will allow you to get a list of your domain controllers and their operating system versions. This script uses information stored in the Active Directory database using the cmdlet get-adcomputer $list = (Get-ADForest).GlobalCatalogs $domainnames = (Get-ADForest).Domains $domainnames_arr
Retrieve Active Directory domain controller OS forest wide
Logoff user session remotely
Get operating system information using WMI
Fill a host file (hosts.txt) with the hostnames you want to retrieve the operating system information Script : $Catalog = GC “C:\hosts.Txt” ForEach($Machine in $Catalog){ $QueryString = Gwmi Win32_OperatingSystem -Comp $Machine $QueryString = $QueryString.Caption Write-Host $Machine “:” $QueryString } Reference
Get HP iLO board informations using XML
List the installed softwares remotely using WMI
This script gets the installed software list on a specific computer using WMI Script : $strComputer = “computer_hostname” $colItems = get-wmiobject -class “Win32_Product” -namespace “root\CIMV2” ` -computername $strComputer foreach ($objItem in $colItems) { write-host “Caption: ” $objItem.Caption write-host “Description: “
Get hotfix list remotely
This script gets the hotfix list installed on a remote system. I add a date filter to the result. Script : $strComputer = “remote_system_name” $hotfixlist = Get-HotFix -ComputerName $strComputer foreach ($hotfix in $hotfixlist) { if ($hotfix.psbase.properties[“installedOn”].Value -eq “10/28/2010”) { write-host