Skip to content

Instantly share code, notes, and snippets.

#Methods to clear up Sync problems
#Cloud objects no longer paired with their local objects. Need to hard match the GUI
#Connect to MGGraph first
Connect-MgGraph -Scopes "User.ReadWrite.All", "Group.ReadWrite.All", "Directory.ReadWrite.All"
Update-MgUser -UserId user@domain.net -OnPremisesImmutableId "base64_GuidString" #Can Get Base64 String from the Entra Error object or script below
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True
Set-NetFirewallProfile -Profile Domain,Private,Public -DefaultInboundAction Allow
Set-NetFirewallProfile -Profile Domain,Private,Public -DefaultOutboundAction Allow
$officePaths = @("C:\Program Files\Microsoft Office\Office15", "C:\Program Files\Microsoft Office\root\Office16")