Office 365 repair remotely with Powershell

1
2
3
4
5
6
7
$cred = Get-Credential
Enter-PSSession *computername* -cred $cred
cd 'C:\Program Files\Microsoft Office 15\ClientX64\'
.\OfficeClickToRun.exe scenario=Repair DisplayLevel=false RepairType=quickRepair forceappshutdown=true

# if quick repair did not solve it
.\OfficeClickToRun.exe scenario=Repair DisplayLevel=false RepairType=FullRepair forceappshutdown=true

Connect to Office 365 Powershell

1
2
3
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $cred -Authentication Basic -AllowRedirection

Import-PSSession $session

Unable to start OneDrive Windows 10

  1. Run gpedit.msc (Local Group Policy Editor)
  2. Next navigate to Computer Configuration\Administrative Templates\Windows Components\OneDrive.
  3. In the right panel, double click Prevent the usage of OneDrive for File Storage. Set it to Disable

White font with Chrome 63.0.3239.8 in CRM

On the CRM server

  1. Open C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\css\1033\notesv2.css.aspx  and search for #0000.
  2. Change this to #000000 and save the file
  3. Run iisreset

On the client

  1. Go to the site that is showing white font and press SHIFT+F5

Manually remove Direct Access from a client

If the client is unable to do a DNS lookup, remove the following in the registry to disable/remove Direct Access DNS config.

1
2
3
4
5
6
$reg = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\DnsPolicyConfig'

Get-ChildItem -Path $reg |
ForEach {Remove-Item $_.pspath}

Restart-Service DNSCache -force