Page 1 of 1

Managing Clients via Office365 POSH Management Shell

Posted: Mon Oct 04, 2021 4:08 pm
by Cubert
Using Office365 for Automate's Office365 POSH Management Shell

You can manage the Office365 services directly through the Office365 POSH Management Shell inside the plugin for any client under your management and control. All modules needed should automatically install when you launch the console and the client selected will become the target tenant


Using the Client selector load the client you would like to manage via PowerShell.

clientselector.PNG
clientselector.PNG (6.67 KiB) Viewed 3907 times


Select the Open Shell button next to the client selector to launch the Office365 POSH Management Shell. The following window will open and start to load everything you will need to manage Office365.com


POSH_Console.PNG
POSH_Console.PNG (63.7 KiB) Viewed 3641 times
(We will remove banner in next few releases, giving people notice for the short term to changes in exchange cmdlets)


The shell will automatically load (and install if needed) the MSOnline, Exchange and SharePoint modules before opening a session with Microsoft Online. Once the window has stopped loading you can use it to call any function or operation available in the loaded modules. If you are a PowerShell-Nut then you will like the easy of access to the POSH terminal.

Re: Managing Clients via Office365 POSH Management Shell

Posted: Fri Oct 15, 2021 1:57 pm
by Cubert
Some issues you may find based on environments, OS levels and PowerShell versions.

Issue #1
Make sure the User you have as admin in your Office365 configuration is also an admin for SharePoint.

To assign a user the SharePoint admin role, see Assign admin roles or Assign admin roles to Microsoft 365 user accounts with PowerShell.


Issue #2
Modules not auto installing as they should. You can manuall install the modules quickly on any agent by:

Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an administrator).

To Manually install SharePoint Powershell Modules (As Admin)
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

To Manually install SharePoint Powershell Modules (As normal user)
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser

To Manually Install MSOnline Modules (As Admin)
Run the Install-Module MSOnline command.
If you're prompted to install the NuGet provider, type Y and press Enter.
If you're prompted to install the module from PSGallery, type Y and press Enter.


Issue #3
You must use a 64-bit version of Windows. Support for the 32-bit version of the Microsoft Azure Active Directory Module for Windows PowerShell ended in 2014.

You can use the following versions of Windows as collectors and when launching the POSH console:

Windows 10, Windows 8.1, Windows 8, or Windows 7 Service Pack 1 (SP1)

Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 SP1


PowerShell
For the Microsoft Azure Active Directory Module for Windows PowerShell module, you must use PowerShell version 5.1 or later, up to PowerShell version 6. You can't use PowerShell version 7.

Re: Managing Clients via Office365 POSH Management Shell

Posted: Fri Oct 15, 2021 8:19 pm
by Cubert
We have upgraded to Exchange PowerShell Module EXOv2.

Any console command for exchange must come from EXO2 syntax.

Code: Select all

EXO V2 module cmdlet	                      Older related cmdlet
Get-EXOMailbox	                              Get-Mailbox
Get-EXORecipient                                 Get-Recipient
Get-EXOCasMailbox                             Get-CASMailbox
Get-EXOMailboxPermission	              Get-MailboxPermission
Get-EXORecipientPermission	              Get-RecipientPermission
Get-EXOMailboxStatistics	              Get-MailboxStatistics
Get-EXOMailboxFolderStatistics	      Get-MailboxFolderStatistics
Get-EXOMailboxFolderPermission	      Get-MailboxFolderPermission
Get-EXOMobileDeviceStatistics	      Get-MobileDeviceStatistics

Re: Managing Clients via Office365 POSH Management Shell

Posted: Wed Oct 20, 2021 3:58 pm
by Cubert
If modules are failing to load, try running the Control Center as Admin once. Log in as yourself and retry POSH office365 console. It should as a result of running as admin run the POSH as admin as well.


See if Modules install.

If so they should be available when you run in normal mode.