Chris Bradbury

Powershell

Powershell

Powershell, Let’s Encrypt and Lansweeper

Looking at moving away from purchased certificate towards free Let’s Encrypt generated certificates, Lansweeper posed a bit of an issue. Following Lansweeper’s SSL instructions to automate the process, a certificate would need to be generated, installed and then it’s thumbprint added to a config file. The below Powershell script uses Read more…

By chrisbradbury, 6 months6 months ago
Active Directory

AD OU – Remove Protected From Accidental Deletion

When creating an OU in AD, ticking the Protect from Accidental Deletion box seems like a good idea. Until you go to delete the OU. Even more so if you have multiple nested OUs and just want to delete the top level one. Powershell to the rescue! We can use Read more…

By chrisbradbury, 11 months11 months ago
Active Directory

GAM – Hide all users in AD OU from Global Address List

Fairly niche one this one. Needed to hide all the users in a specific group from the GSuite Domain’s Global Address List Powershell to the rescue. Pulling through all the users in a specific searchbase and iterating through them with the GAM gal off command. Get-ADUser -Filter * -SearchBase “OU=Name,DC=domain,DC=local” -Properties Read more…

By chrisbradbury, 3 years11 months ago
GAFE

GAM – Set profile photo of entire group to single image

For out students, we want a single image for their GSuite profile photos. Sadly there isn’t a way of preventing users from changing their photo, so we have to run a script regularly to remove any changes they may have made. #- Address of the group -# $groupAddress = “[email protected]” #- Read more…

By chrisbradbury, 4 years4 years ago
Calendar

GAM – Give mail group calendar permissions

Had a need to add all the users from a GSuite group as editors on a Google Calendar. The script reads and outputs the current ACLs, gets the members of the group and then adds them to the calendar giving them the appropriate permissions. At the end, it outputs the Read more…

By chrisbradbury, 4 years4 years ago
Active Directory

Powershell AD – Output groups a user is a member of

We occasionally need to make a note of the groups a user is a member of. If they’re going on maternity leave, for example. This script does require the Active Directory Module For Windows PowerShell. $user = “username” Get-ADPrincipalGroupMembership $user | select name  

By chrisbradbury, 4 years4 years ago
  • Cookie Policy
This site uses cookies: Find out more.