Apr 08 2020 02:36 PM - edited Apr 08 2020 02:38 PM
Is there a way to limit the cmdlets that are retrieved when using the Exchange Online PowerShell V2 module? Cmdlet Connect-ExchangeOnline does not appear to have the equivalent CommandName switch that Import-PSSession has.
Apr 09 2020 12:32 AM
SolutionWell, it's a "wrapper" cmdlet, it calls Import-PSSession internally. You can modify the corresponding script containing the cmdlet, which you can find under: C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\XXXX\ExchangeOnlineManagement.psm1
Or you can do "manual" connectivity by getting a token directly and passing it to New-PSSession (although you will loose some functionalities).
Apr 09 2020 10:31 AM
@Vasil Michev , So a parameter would have to be built-in... Is there a formal way to make that request to the devs?
Apr 10 2020 12:03 AM
You can email them at the address listed here: https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/exchange-online-powershell-v2/e...