
To import cloud-based commands to your local computer, run this command: $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirectionħ.

Login with your fully qualified domain credentials (example: Now run this command to initiate the connection: Start Windows PowerShell and once the prompt appears, run this command:ĥ. Microsoft also has an article for that (“ Connect Windows PowerShell to the Service“) but I will also list the procedure in the following steps.Ĥ. Now you need to connect Windows PowerShell to O365. Next you need to make sure that the account you use to login to O365 via PowerShell is authorized to connect to WinRM (by default you should be able to): Control Users’ Access to Windows Remote Managementģ. First you need to make sure you have the correct version of PowerShell and WinRM, and Microsoft has already done the work in writing that article: Install and Configure Windows PowerShell Enable and Use Remote Commands in Windows PowerShellĢ. To grant mailbox and folder permissions via PowerShell, here’s what you need to do:ġ. So even for these rare occurrences, and for things that don’t need to be automated, we still need to head to the PowerShell command prompt to get the job done. Microsoft doesn’t offer us a great way to do this via GUI unless we want to take control of an actual mailbox account (or walk a user through it over the phone). And in our environment, our exchange is in the cloud, or in other words, we use O365 (Office 365).

For example, where I work we occasionally need to grant one user access to folders in another user’s exchange mailbox. Okay, this is good when you want to automate things, but not so great for the occasional need. Features we’d love to see in a GUI interface instead require commands and scripts. The script will create the folder if it doesn’t exist, and then share it.In case you haven’t noticed, Microsoft is making you do more and more with PowerShell. I resolved some minor issues and added the pipeline parameters and some minor error checking, and the description. This is based partly on How to Use PowerShell to create shared folders in Windows 7. This function will create the share, but does not set sharing permissions.

PowerShell can help streamline this process. Often we need to create file shares, and this is generally fairly boring.
