Tuesday, April 23, 2013

Using PowerShell with Office 365

Given below are the quick steps to connect to your Office 365 site with PowerShell. As the first thing you need to download "SharePoint Online Management Shell". Get the correct version (x64 or x86) and run the setup.

Then run SharePoint Management Shell (if you have SharePoint in your machine) or SharePoint Online Management Shell.
In my case I already have a SharePoint Online site, if you don't, go to office.microsoft.com and give it a try.
After that go to the admin site and check the availability as it's the admin URL you need to connect to with the Connect-SPOService cmdlet.
With the credential parameter you need to pass a user with admin privileges to your Office 365 site. If it's one of your domain yours, make sure your domain is connected to the office 365 environment with ADFS.
It will ask for your password.
OK, the next thing is to find out the stuff you can do with PowerShell in O365. Simple, type cmdlet help SPO or Get-Command -Module Microsoft.Online.SharePoint.PowerShell in shell window.
Simply, you are through. Try out the listed cmdlets.

No comments: