Azure, Technology

2. Managing Services with PowerShell

Foundation of Administration with PowerShell

PowerShell uses the verb-noun system.

Verb examples

  • Get
  • Set
  • Move
  • Copy
  • Start

 

 

Connecting PowerShell to Manage Cloud Services

You first have to install the modules for the commands to manage the cloud services.

To search and see if you have the commands:

Searching for Microsoft Online 365 commands-

Get-command -noun *msol*

 

 

 MSonline management

#---------------------------------------------------------------------------#

#Install the module
Install-module msonline

#Connect to M365
 Connect-MsolService

 #Create an M365 user
 New-MsolUser -UserPrincipalName paddy@spktechfit.com -DisplayName "Paddy Keenaghan" -FirstName Paddy -LastName Keenaghan -Department BossMan

 #Create a group
 New-MsolGroup -DisplayName "TheKings" -Description "My Test Group"

 #To create a M365 group you need to use Exchange Online

 

Exchane Online Mgmt

#------------------------------------------------------------#

 #Install the module
 Install-module -Name ExchangeOnlineManagement -RequiredVersion 1.0.1

#Import the module
 Import-Module ExchangeOnlineManagement

  #Connect to EOL
 Connect-ExchangeOnline

 #Create an M365 group (in Powershell these groups are called "Unified"
 New-UnifiedGroup -DisplayName "TheBosses" -EmailAddresses theboss@spktechfit.com -AccessType Private

#Get list of groups
 Get-UnifiedGroup



#------------------------------------------------------------#


Manage Teams

#------------------------------------------------------------#

#Install TEams Module
 Install-Module -name MicrosoftTeams

#Connect to Teams
 Connect-MicrosoftTeams

#List Teams
 Get-Team

#------------------------------------------------------------#

Leave a Reply

Your email address will not be published. Required fields are marked *