Pages

Monday, 11 June 2012

Windows PowerShell cmdlets for Office 365 - Where to Start

What You Required:
Where to start:
Open Windows PowerShell and type import-module MSOnline ( Import Office 365 Module)
Or
Click at start -> All Programs ->Microsoft Online Services -> Microsoft Online Services Module for Windows PowerShell
Connect-MsolService
(Sign In Dialog Will Appear, Enter User name and Password to Connect.)  
Starting from Simple Commands
Get-MsolUser -UserPrincipalName sanaullah@mubbi.com                                                

Returns the Details of Given User
     



Getting Help
Get-Help <CommandName>
Example Get-Help Get-MsolUser
For More Detailed Help you can send Extra Parameter for it
  1. Get-Help Get-MsolUser -examples
  2. Get-Help Get-MsolUser -detailed
  3. Get-Help Get-MsolUser –full

Add User
New-MsolUser -UserPrincipalName majid@mubbi.com -DisplayName "Majid Rehan" -FirstName "Majid" -LastName "Rehan"

To View all Parameter you can Type Get-Help New-MsolUser -Detailed

Remove User
Remove-MsolUser -UserPrincipalName majid@mubbi.com

More Details will be posted in Next Blogs....

No comments:

Post a Comment