Scripts repository
Assign/Revoke Microsoft 365 licenses based on user group membership priority
The script assigns a Microsoft 365 (Office 365) license for a user based on which AD group the user is a member of.
Automatically add a digit to the username if it is not unique
The scripts can be used to automatically generate a unique username for a user by adding a digit.
Cancel user creation if there are no available Microsoft 365 licenses
The script cancels creation of a new user if there are no available Microsoft 365 (Office 365) licenses in the specified plans of the tenant associated with the user.
Check whether email and username are unique
The script checks whether the email address and username specified for a new user are unique.
Check whether Employee ID is present in SQL Database
This script checks whether an Employee ID specified for a new user in Active Directory is present in the user's record from an SQL HR database.
Convert the first character of a property value to uppercase
The script converts the first character of a property value to uppercase.
Convert user mailbox to a resource mailbox in Exchange Online
The script converts an Microsoft 365 (Office 365) user mailbox to a room or equipment mailbox in Exchange Online.
Create groups based on departments of users
The script can be used to add users to groups by department. It adds a user to a group with the same name as the user's department. If a group with the necessary name does not exist it will be created.
Create Remote Desktop Services profile folder
A script to create a Remote Desktop Services profile folder for a user on the file system.
Create username automatically
This PowerShell function can be used to create a username for a new user automatically based on values of the user properties.
Ensure Full Name is unique
This PowerShell script will cancel creation of a new user if another user with the same full name already exists in your Active Directory domain.
Grant access to user's home folder
The scripts grant full access permissions over the home folder of the target user account.
Import user information from SQL database
The script updates user accounts in Active Directory based on information in an SQL database. If a user does not have an account in Active Directory, the script will create it based on the information available in the database.
Provision shared and room mailboxes
These scripts show how to provision resource mailboxes in Exchange On-Premises.
Remove disk quota for user on the drive where the user's home directory is located
This script removes disk quotas for a user on the drive where the user's home directory is located.
Update linked mailbox properties with values of the master account
The script updates properties of a linked mailbox with the corresponding property values of the master account.
Verify complexity requirements for user password
The script checks whether a password that is assigned to a user meets Password Complexity Requirements and has the required minimum length.