Jump to content

Recommended Posts

  • 4 weeks later...
  • 4 weeks later...
Posted

i get this

 

The term 'Get-Mailbox' 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.

At line:1 char:12 + Get-Mailbox <<<< -ResultSize unlimited | Set-MailboxMessageConfiguration -Is ReplyAllTheDefaultResponse $false + CategoryInfo : ObjectNotFound: (Get-Mailbox:String) [], Command NotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Posted

You need to connect to the online instance of your O365 system first in order to gain access to the other powershell commands.

 

Your commands should look something similar to this:

 

$cred = get-credential
$session = new-pssession -configurationname Microsoft.Exchange -connectionuri https://ps.outlook.com/powershell -credential $cred -authentication basic -allowredirection
import-pssession $session
import-module msonline
connect-msolservice -credential $cred

  • Thanks 1
Posted

Start with

Set-ExecutionPolicy RemoteSigned
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

That'll ask you for some credentials, give it some for an Office 365 administrator. It'll connect to Exchange Online, import the Exchange commands (such as Get-Mailbox) and then allow you to run the code I posted just above.

  • Thanks 1
Posted (edited)
Mine's been going about half an hour as well, but I ran it against a single user first and it was fine (and did work). Wouldn't be the first Exchange cmdlet I've run that takes forever and a day to finish--plus I imagine this specific command is being run in hundreds of thousands of PowerShell sessions right now :) Edited by sonofsanta
Posted
Mine's been going about half an hour as well, but I ran it against a single user first and it was fine (and did work). Wouldn't be the first Exchange cmdlet I've run that takes forever and a day to finish--plus I imagine this specific commans is being run in hundreds of thousands of PowerShell sessions right now :)

 

Scary thought on how much damage i could do if i typed in the wrong commands.

Posted

Interesting, running that command I get an error:

 

Processing data from remote server failed with the following error message: WS-Management connot process the request. The operation failed because of an HTTP error. The HTTP error (12152) is: The server returned an invalid or unrecognized response . For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo              :   OperationStopped: (Sytem.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRemotingTransportException
+ FullyQualifiedErrorId   :   JobFailure

 

Any ideas anyone? Could it be that my tenancy hasn't been updated to include the IsReplyAllTheDefaultResponse entry yet?

Posted
Interesting, running that command I get an error:

 

Processing data from remote server failed with the following error message: WS-Management connot process the request. The operation failed because of an HTTP error. The HTTP error (12152) is: The server returned an invalid or unrecognized response . For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo              :   OperationStopped: (Sytem.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRemotingTransportException
+ FullyQualifiedErrorId   :   JobFailure

 

Any ideas anyone? Could it be that my tenancy hasn't been updated to include the IsReplyAllTheDefaultResponse entry yet?

 

No... it tells you "Command not recognized" in that instance (or words to that effect about the attribute), but that's an HTTP error from the server it's giving you.

 

Try it again in a bit...?

Posted
No... it tells you "Command not recognized" in that instance (or words to that effect about the attribute), but that's an HTTP error from the server it's giving you.

 

Try it again in a bit...?

 

Nope, still the same error last night and this morning. :(

Posted (edited)
Yes, there is! Just this moment tried the PowerShell cmdlet again (that wasn't working last week) and it's running now :D

Get-Mailbox -ResultSize unlimited | Set-MailboxMessageConfiguration -IsReplyAllTheDefaultResponse $false

 

Tested & verified as doing the job :thumb:

 

Works a treat! Thanks!

 

Still rolling it out though, we have thousands of mailboxes from multiple schools.

Edited by FN-GM
Posted
Nope, still the same error last night and this morning. :(

 

Google is implying it's a fault in the server IIS config... which you can't do a lot about. Maybe reinstall the prerequisites you need for PowerShell to connect, just in case, and if it's no better then you might have to open an Office 365 support case (which is both free and helpful, surprisingly).

  • Thanks 1
  • 1 month later...
Posted
I don't suppose anyone is aware of a 365 Powershell parameter to set the default for the "View As" filter option for mailboxes from "Conversation" to "Messages"?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...