Author Archive

OneDrive for Business – Known Folder Sync fails

September 26, 2018 Leave a comment

When activating Known Folder Sync in OD4B the sync never starts due to folders that cannot be synced.
These folders are Junction folders on the drive and needs to be deleted.

First do a dir in the users document folder and look for hidden files like this:
C:\Users\USER\Documents>dir /ah
Volume in drive C is Windows
Volume Serial Number is 903B-D31E

Directory of C:\Users\USER\Documents

18.04.2018 10.10 2 230 Default.rdp
26.09.2018 11.59 402 desktop.ini
26.09.2018 11.59 Intern video [C:\Users\USER\Videos]
26.09.2018 11.59 Min musikk [C:\Users\USER\Music]
26.09.2018 11.59 Mine bilder [C:\Users\USER\Pictures]
2 File(s) 2 632 bytes
3 Dir(s) 55 879 593 984 bytes free

Then delete the junctions like this:

C:\Users\ÙSER\Documents>rmdir “Intern video”
C:\Users\ÙSER\Documents>rmdir “Min musikk”
C:\Users\ÙSER\Documents>rmdir “Mine bilder”

Other files in conflict with the sync needs to be removed from the local machine before the cloud sync can start. Backup and move the files in case of future needs.

Happy OneDriving.

Add Azure AD user local Administrator group

November 3, 2016 Leave a comment

Open CMD as administrator and run the command:
net localgroup administrators  AzureAD\UserName /add

Change language – Office 365 Mailbox

October 24, 2016 Leave a comment

To change the Language for a Office 365 mailbox (Exchange Online), run the following commands:

$O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $O365Cred -Authentication Basic -AllowRedirection

Import-PSSession $O365Session

Set-MailboxRegionalConfiguration -Identity “USER” -Language nb-no -LocalizeDefaultFolderName

For full list of cultureinfo classes (Languages) see:

CMD line: add domain to local intranet zone

A quick way to add domains to a computers Local intranet zone is to run the following regs in cmd. No Admin rights needed.

REG ADD “HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\ ” /v https /t REG_DWORD /d 1 /f
REG ADD “HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\ ” /v https /t REG_DWORD /d 1 /f

Tags: , ,

How to add a user as a Site Collection administrator – Office 365

To add users as site Collection admins follow this procedure:

  1. Connect to the SharePoint admin center
  2. Select User Profile, then Manage User Profiles
  3. Find a profile
  4. Manage Site Collection Owners
  5. Change the primary or secondary site collection administrator
  6. Repeat for every single user

Azure VPN – Change Local Site Public IP

If a Clients Local site public IP changes the VPN tunel betwen Azure and the Local Site will disconnect. To fix this do the following:

Connect to Azure using powershell and run the following command:

New-AzureRmLocalNetworkGateway -Name LocalSite -ResourceGroupName [ClientRG] -Location ‘northeurope’ -GatewayIpAddress ‘[Public wan IP]’ -AddressPrefix ‘[LAN IP Net’


(Change the RG and Public wan IP and the LAN IP Net to the correct settings)

Office 365 Add calendar permissions with powershell

To add permissions on a Exchange Object in Office 365 using PowerShell the cmdlet set-MailboxFolderPermission or add-MailboxFolderPermission can be used.

In this example we add editor permissions for user2 to user1’s calendar. This will enable user2 to edit, add or delete content of user1’s calendar.

set-MailboxFolderPermission -Identity\calendar -user -AccessRights Editor

Note: kalender is the Norwegian Word for Calendar

To bulk add all users in a Tennant as Reviewer to’s calendar run the following cmdlet.

$Users = Get-Mailbox | Select-Object -ExpandProperty userprincipalname
ForEach ($user in $Users )
Add-MailboxFolderPermission -Identity “\calendar” -User $User -AccessRights Reviewer

For full details of this cmdlet:

And for my original Source:

%d bloggers like this: