Monday, April 17, 2017

"FailureCategory=LiveID-InvalidCreds" While connecting to Office 365 through Powershell


I am gonna share an error and a solution today that I encountered while connecting to Exchange Online/O365.

I was using the New-Pssession to connect to Exchange online through PowerShell.

I would always end up with the following error

New-PSSession : [] Connecting to remote server failed with the following
error message :
9:57:48 AM] [FailureCategory=LiveID-InvalidCreds] Access Denied For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:15
+ ... XOSession = New-PSSession -ConfigurationName Microsoft.Exchange -Conn ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
    + FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed

The user was a global Administrator on O365 so I was under the impression that it should just be enough to get this working.

Then after searching for more options, I found a place under Exchange tab, where in we can provide permissions for the Management. All you need to do is:

1. Go to Office 365 Portal
2. Click on Admin
3. Click on Exchange( it will open up a new window)
4. Click on Permissions as seen below:

5. Click on Organization Management:

6. Under members add the user account that you are trying to connect through PowerShell.

Once this is done. Authenticate again using a new powershell window and you are all set.

Friday, June 19, 2015

Enable UI in Windows Server Technical Preview 2


Recently, I installed Windows Server Technical Preview 2 and I just could not find the normal UI that you would otherwise have.  There are two options you will see when you Install Windows

No Matter what you choose, you will end up with no UI.

After researching a bit , I could only conclude that this was by design and the only way to enable it is to add it through Powershell or through the Server Manager. Here are the options:

1. Powershell:

Run the command

2. Server Manager: