29 C
Dubai
Wednesday, December 11, 2024

Connecting to PowerShell Online

  • Exchange Online PowerShell (Exchange Settings)
  • Azure Active Directory MSOnline (msol cmdlets)
  • Azure Active Directory PowerShell for Graph (azuread cmdlets)
  • Virtual Machine settings using Powershell (AzureRM cndlets)

PowerShell Capabilities are limitless with these modules you can automate most of the repetitive activities with ease.

Exchange Online PowerShell (Connect-ExchangeOnline)

Exchange Online PowerShell allows you to Exchange Online settings using a command line. You can manage all bulk changes using scripts and with a variety of commands using pipeline methods.

image

Let’s see how to Connect Exchange Online PowerShell

Set-ExecutionPolicy RemoteSigned
image
Install-Module PowershellGet -Force
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline

Sample Command to make sure it’s connected.

image

You can explore the commands available using

get-command

it supports wildcards

image

Connecting to Office 365 PowerShell

Mostly to manage azure active directory users

Microsoft Azure Active Directory Module for Windows PowerShell (cmdlets include MSol in their name)

Install-Module MSOnline
image
Connect-MsolService
image

Sample Command to make sure its connected.

Get-MsolUser -UserPrincipalName user@domain.com
image

Azure Active Directory PowerShell for Graph (cmdlets include AzureAD in their name)

Install-Module -Name AzureAD
image
image
Connect-AzureAD
image
Get-AzureADDomain -Name azure365pro.com
image

To Get Virtual Machine settings using Powershell and AzureRM commandlets

Install-Module AzureRM
image
Connect-AzurermAccount
image

Sample Command to make sure it’s connected.

Get-AzureRmVM
image

Please note that if you don’t kill your session. You may need to wait until the power shell session expires if you reconnect multiple times.

Remove-PSSession $Session
Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?