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
Different ways of getting AD group members
I will show you, in the scripts below, different ways of getting Active Directorw group members with Powershell. Scripts ADSI method $root=([ADSI]””).distinguishedName $Group = [ADSI](“LDAP://CN=Domain Admins, CN=Users,”+ $root) $Group.member Get-ADGroupMember cmdlet $root = (get-ADDomain).Distinguishedname $group = “CN=Domain Admins, CN=Users,”+$root (Get-ADGroupMember
List the GPO GUID
Retrieve the Active Directory functional levels
You can retrieve the Active Directory forest functional level with the powershell cmdlet Get-ADForest import-module activedirectory Get-ADForest | select forestmode For the domain functional level, you can use the powershell cmdlet Get-ADDomain Get-ADDomain | select domainmode Reference Get-ADForest Syntax Get-ADForest