1. Import the Active Directory module: Import-Module ActiveDirectory 2. To get the list of Active Directory sites: Get-ADReplicationSite -Filter...
Get-ADGroup -Filter * | Select-Object Name, GroupCategory, GroupScope | Format-Table -AutoSize...
Get-ADUser -Identity "kcordero" -Properties MemberOf | Select-Object -ExpandProperty MemberOf ...
I wanted a way to server for servers with specific partial names. For example, let us say I’m searching for...
This will dump all GPO’s into HTML files. Get-GPO -all | % { Get-GPOReport -GUID $_.id -ReportType HTML -Path "C:\MyExports\$($_.displayName).html"...
Group = Web Admins Get-ADGroupMember -Identity "Web Admins" | Where-Object {$_.objectClass -eq "user"} | Select-Object Name, SamAccountName...
$lastWeek = (Get-Date).AddDays(-7) Get-ADComputer -Filter { whenCreated -ge $lastWeek } ...
The commands below are helpful when troubleshooting and could be beneficial when designing for scalability. They can easily be scripted...