Script Samples

In this section, you will have access to a collection of PowerShell scripts that including ones that help you establish a connection to your Office 365 evnironment, automate repetitive tasks such as adding multiple users and exporting a list of users.


Please note that the sample scripts that you download may require edits such as adding your domain name. In addition, you can easily customize the scripts so that they can better meet your needs.

This script will demonstrate how to generate a report, save it to a CSV file, which provides a list of all the users who have not logged in for at least 30 days.  With this information you can then take the appropriate action to remove unused mailboxes.

Downloaded 0 times.  (5)

OPTION 3 - Have Azure AD automatically generate a random password for each user, and assign. The command will return a list of UPN's and their new password once complete.

Downloaded 0 times.  (0)

This script will demonstrate how to manage your SharePoint Online PowerShell session.

Downloaded 0 times.  (0)

This script will demonstrate how to manage your Exchange Online PowerShell session.

Downloaded 0 times.  (0)

Assigning a password to a variable and assigned it to all users in a CSV file.

Downloaded 0 times.  (0)

OPTION 1 - Assign a password to a variable and assign to all users in the CSV file.  Read the CSV file; reset the passwords for users contained in the file and force the user to change their password at next login.

Downloaded 0 times.  (0)

Manually define a new password for each user and assign in bulk.

Downloaded 0 times.  (0)

OPTION 2 - Populate an additional column in the CSV called 'Password' with valid passwords, and assign to all users (and enforce password change).

Downloaded 0 times.  (0)

By default each SharePoint site is created from a standard template (eg. STS#0) is created with three membership groups, Owners, Members, and Visitors; with Full Control, Contribute, and View-only site permissions respectively.

Downloaded 0 times.  (0)

This script will demonstrate how to manage your Skype for Business PowerShell session.

Downloaded 0 times.  (0)

This script will demonstrate how to view your active PowerShell sessions.  It will also demonstrate how to close your active PowerShell sessions.

Downloaded 0 times.  (0)

To export the results of the non-licensed users into a CSV file run the following command. 

Downloaded 0 times.  (0)

To display example syntax for a given command in the PowerShell window, run the following script.

Downloaded 0 times.  (0)

This command will set a policy that requires that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher. 

Downloaded 0 times.  (0)

This command will set the execution policy to the default setting for windows.

Downloaded 0 times.  (0)