Map network drives to the correct locations Run CMD as Administrator Mirror file & directories and output detail to text file robocopy E:\..... z:\.... /MIR /S >c:\temp\detail.txt
List all users in the domain and email addresses
import-module activedirectory #List all users in the domain # Display Name and Email Address get-aduser -Filter * -SearchBase "dc=Test,dc=com" -Properties Displayname,emailaddress | select displayname ,emailaddress | Export-Csv C:\temp\users_and_email.csv
Troubleshooting Windows Updates and WSUS
Troubleshooting Windows Updates #Windows 10 #Windows 2016 Windows Update Log PowerShell command to check the Windows Update log • Get-WindowsUpdateLog Check Registry Keys Run command prompt as adminitrator and…
Get a list of active users which have logged on to the domain in the last 7 days
# Get a list of users which have logged on to the domain in the last 7 days $Date = (Get-Date).AddDays(-7) Get-ADUser -Filter {LastLogonDate -gt $Date} | Select distinguishedName
PowerShell Script to find all AD users who have the “cannot change password” box checked in a specific OU
# script to find all AD users who have the "cannot change password" box checked in a specific OU # Windows Server 2016 # Powershell Get-ADUser -Filter * -Properties CannotChangePassword…