Purge ADObject from Active Directory recycle bin

When deleting an AD object, it will (if the Recycle bin is enabled) be moved to the Active Directory recycle bin. Sometimes you want to permamently remove the object, for example if you want to recreate a pc or server with the same name. To do this, open PowerShell and type in the following commands; […]

Read More »

SharePoint Online – Change timezone for all SPO Sites

Today i needed to change the TimeZone for a lot of sites, when searching online i found some other scripts but i found them too complicated and needed something easier to manage. I combined and script some other script and came up with this: # Define variable $adminurl = https://tenantname-admin.sharepoint.com $timezone = “(UTC+01:00) Amsterdam, Berlijn, […]

Read More »

PowerShell – Change homedirectory permissions in bulk.

Recently I was asked to change the homedirectory permissions for >4000 users from Full Control, to ready only. I’ve used below powershell commands to achieve this. Firstly we need to get all SamAccountName’s in a .csv list. (Change the searchbase). Get-ADUser -Filter * -SearchBase “OU=www,DC=iterrors,DC=com” | Where { $_.Enabled -eq $True} | select SamAccountName | […]

Read More »

Sharepoint Online – Add members and owners via PowerShell

To add members and owners to a SharePoint Online TeamSite you have the below commands avaiable: Note that if you need to make someone Owner of the Teamsite, the user first needs to be member! And then you make the user Owner. #Get Groupnames Get-UnifiedGroup #Check for current members Get-UnifiedGroupLinks –Identity “groupname” –LinkType Members #Check […]

Read More »