Reputation: 863
I'm trying to set the 'Focused Inbox' to disabled for the whole organisation. I've found lots of scripts and tutorials online, most of which point toward using the Exchange Online Session in PowerShell.
e.g.:
My PS script is as follows:
# Set up Credential
$UserCredential = Get-Credential
# Create the Exchange Online session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
# Import the cmdlets into this session
Import-PSSession $Session -DisableNameChecking
# Get a list of the organisation's current settings
Get-OrganizationConfig
# Now set the 'Focused Inbox' option to 'off' for everyone
Set-OrganizationConfig -FocusedInboxOn $false
# Must remove the session to avoid clogging and clutter
Remove-PSSession $Session
The 'Get-OrganizationConfig' command returns a full list of the current config:
However, when I execute the 'Set-OrganizationConfig' command, it fails with the following message:
Set-OrganizationConfig : The term 'Set-OrganizationConfig' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
My presumption is that it's a permissions issue, however, I can see all the organisation's config, and it's the cmdlet that's missing.
What is the problem?
I am:
Upvotes: 3
Views: 15602
Reputation: 863
Create the $Session
using an account that has Global Admin privileges in your O365 Tenant and you'll see that the 'Set-...'
cmdlets automatically get downloaded and inserted into your session.
Upvotes: 1