Windows Server

Using CMD & PowerShell to Find Last Boot Time Remotely

Posted on

Here is a simple and short command that will help you tell the last boot time. CMD: SystemInfo /S $Server | find /i “Boot Time” Powershell Script: $Server = Read-Host -Prompt ‘Input the server name’ SystemInfo /S $Server | find /i “Boot Time” > C:\Users\$env:username\Desktop\Last_Boot-$Server.txt The above Powershell script will pop up and prompt you […]

Active Directory

Export list of all Active Directory Security Groups with their Members

Posted on

  Learn how to easily export Active Directory Security Groups with their members to a CSV file in Windows PowerShell.   Here is a Script: $Groups = Get-ADGroup -Properties * -Filter * -SearchBase “OU=Groups,DC=corp,DC=ourcompany,DC=Com” Foreach($G In $Groups) { Write-Host $G.Name Write-Host “————-” $G.Members } Here is another Script: $Groups = Get-ADGroup -Properties * -Filter {GroupCategory -eq “Security”} […]