How to apply Tags on all Azure resources using PowerShell

You can use the tags to logically organize all the resources in Azure. Tag in azure is a name and value pair which can be applied using GUI or by using PowerShell. You can take the approach of GUI if there are not too many resources where you have to manage the tags. In that case, you can click on each resource and then click Tags (as shown in below screenshot) on the left hand side pane and fill the details for Name/Value Pair. While this method is manual and also requires a lot of time if the number of resources where the tags needs to be populated increases from …

Read more

Office365/Exchange Online – Messages are not moving to Archive Mailbox after Applying Retention Policy | Litigation Hold | Retention Hold

Recently came across an issue where we had applied the Mailbox Retention Policy for all the users but for some of the users, emails were not getting moved to Online Archive Mailbox. After investigating on this issue, it was identified that the retention hold was enabled on these users mailbox which was not allowing the messages to move to Archive Mailboxes. I have used below commands to check the Retention Hold value for the users and updated this value to fix the issue. “Placing a mailbox on retention hold suspends the processing of an MRM retention policy by the Managed Folder Assistant for that mailbox. Retention hold is designed for …

Read more

How to disable a particular service or license for example Teams from office 365 assigned license plan using Powershell

When you assign office 365 license to a user, office 365 services are available to the users like Teams or SharePoint etc. You can enable or disable a specific license for an office 365 account or all office 365 accounts using powershell. Steps: 1) Open Powershell and connect to MSOnline Powershell Module using command connect-msolservice. If you do not have MSOnline Module Installed, you can download it by clicking on MSOnline Offline Installer. Follow the instructions to install the Package Install Powershell Module Manually or use command Install-Module MSOnline to install the module. Please install or import this module on windows powershell as msol commands are not supported on Powershell core. 2) Find the AccountSKUID using below command. …

Read more

Powershell – Set Calendar Permissions on Office365 for list of users given in CSV File

Sharing a script to Set/Apply the Calendar permissions on list of users as mentioned in the CSV File. Please see the format of the CSV file. I created and utilized the script when i migrated Exchange 2010 users to Office 365. Exported the Calendar Permissions of all the users from Exchange 2010 and then saved it in a csv file (as you can see in below screenshot) and Applied the permissions using this script. Please see the screenshots and use the help information in the script to know more details. The Script will try to establish connection with Office365 first. Please provide appropriate username and password to provide relevant permissions to execute this …

Read more

Powershell – Applying Licenses to list of users on Office 365

Summary: Whether the users are provisioned via Azure AD Connect Sync or directly on office 365 cloud (In-Cloud Users). We need to allocate and assign the licenses to the users to get certain features and functionality enabled for them. e.g. For working with Exchange Online, Once you have sync’ed the user to office365, you can assign appropriate license (e.g. Office 365 E3 or office 365 Business Premium etc.) depending upon the plan you purchased from Microsoft to get their mailbox created in Exchange Online. You can assign the licenses via GUI or using Powershell as shown below: ✨GUI Method Assign a license using GUI is simple: just Select the user on office …

Read more

Powershell – Export the list of users and licenses assigned to them from Office 365

Summary: PowerShell Commands to determine the Office 365 Licenses that have been assigned to users. Connect to Exchange Online (EXO) Connect to Azure Active Directory (Azure AD) List the SKUs (Stock keeping units) that the company Owns using Get-MsolAccountSku Export the Users with Licenses assigned to them to a CSV file References:  Product names and service plan identifiers for licensing