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
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
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 #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 paste these query registry keys in to see what your client has set for Windows Updates.
• reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /s
• reg query HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Update
• reg query HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings
Check CBS Log
Find the Component-Based Servicing log here.
• C:\Windows\Logs\CBS
# 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
# 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 -SearchBase “OU=specificOU,DC=TEST,DC=com” | where { $_.CannotChangePassword -eq “true” } | Format-Table Name, DistinguishedName