0

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:

enter image description here

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.

enter image description here

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:

  • Running PS as 'Adminstrator'
  • Using the 'SharePointAdmin' administrator account for the credentials
0

This was a permissions issue.

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.