Category Archives: Powershell

Connect to Microsoft Graph using Client Secret

This is most common method used to avoid interactive login & when you want to run an script in unattended mode. Let’s start by Registering an application in Azure. Below are the steps to register an application in Azure AD: … Continue reading

Posted in MS Teams, Powershell | Leave a comment

Use “Enter” key to copy data in Windows Terminal

While working at PowerShell , we have the option of copying text by selecting it and pressing Enter key. Later, we can paste the text whenever required by right-clicking anywhere inside the window. Unfortunately Windows Terminal does not allow us … Continue reading

Posted in Powershell | Leave a comment

M365 Licensing using msol and AzureAD powershell

M365 licensing can be tricky sometime. Below cmdlt flow will help you sort out your tenant licensing information properly. PS C:\> Install-Module AzureAD PS C:\> Connect-AzureAD PS C:\> Install-Module MSOnline PS C:\> Connect-MSolservice Next lets get the list of all … Continue reading

Posted in Azure, Powershell | Leave a comment

Script to get MS Team user information

You will come across requirement where you need to fetch users MS Teams related information e.g. you are going to enable voice services for the users, so you need to get the required information whether user have required license, usage … Continue reading

Posted in MS Teams, Powershell | Leave a comment

MS Teams Auto-Attendant call forwarding to External PSTN number with Direct Routing

We have a situation where MS Teams auto attendant call need to be get forwarded to external PSTN numbers. As we know Auto-attendant make use of number assigned to resource account. So basically when we are configuring forwarding in Auto … Continue reading

Posted in MS Teams, Powershell | Leave a comment

Caller ID policies to mask user number with Resource account number in MS Teams

Masking caller id is one among the standard phone system feature. When MS Teams user call someone on PSTN number, organization want to show the the common phone number e.g. call from reception should show reception desk number instead of … Continue reading

Posted in MS Teams, Powershell | Leave a comment

Connect various M365 services from VScode

Install PowerShell extension in VSCode Connect to MS Teams from VSCode: Connect to Exchange online from VSCode: Connect to AzureAD from VSCode: Connect to Azure from VSCode:

Posted in Powershell | Leave a comment

Script to connect MS Teams

Sometime you may want to avoid entering user-name and password every time. Below is the small script you can use it to connect to MS Teams. Last line of the below code is just to change the PowerShell title. This … Continue reading

Posted in MS Teams, Powershell | 2 Comments

Exchange PowerShell script to convert DL to contact

Recently I have came across a requirement where customer want to remove few of the DL but they want to keep the email-id mapped to a new contact. All the existing attribute should be stamped to the new contact. LegacyDN … Continue reading

Posted in Exchange Online, Powershell | Leave a comment

Handy Cmdlts in Microsoft Teams

Often we come across of scenario where we need small onliner cmdlts to get information quickly. Below are few such onliner. Get the details of all MS Teams users and value stamped to these user properties. PS C:\> get-csonlineuser | … Continue reading

Posted in Powershell | Leave a comment

Use PowerShell ISE in VSCode

Install PowerShell extension onto the VSCode. 2. Open command palette onto the Vscode using Ctrl+Shift+P and search for ISE. You should be able to see below options. Just select PowerShell: Enable ISE Mode. 3. Once you select the mode, you … Continue reading

Posted in Powershell | 2 Comments