RSS

Category Archives: Office

Office 365 – Create PowerShell Session is failed using OAuth when trying to connect to Exchange Online PowerShell using Connect-ExoPSSession

For some time now I’ve been using the Microsoft Exchange Online Powershell Module that supports Azure multi-factor authentication (MFA)  , but for an unknown reason it stopped working

When trying to connect to Exchange Online PowerShell using the code below with a global administrator account, I was getting an access denied error:

Connect-EXOPSSession -UserPrincipalName admin.bjorn@mydomain.nl
New-ExoPSSession : Create PowerShell Session is failed using OAuth
At C:\users\admin\adppdata\local\Apps\2.0\84VE2AT5.PKO\HHYLAA32.DC7\micr..tion_c3bce3770c238a49_0010.0000_90fa60bba125a33a\CreateExoPSSession.ps1:179 char:22
+ ... PSSession = New-ExoPSSession -UserPrincipalName $UserPrincialName -C ...
+
    + CategoryInfo          : NotSpecified: (:) [New-ExoPSSession], Exception
    + FullyqualifiedErrorID : System.Exception,Microsoft.Exchange.Management.ExoPowerShellSnapin.NewExoPSSession

For me the solution was to install the Microsoft Exchange Online Powershell Module through Programs and then reinstalling it.

For more information about the new Exchange Online PowerShell module that supports Azure multi-factor authentication (MFA) see: https://technet.microsoft.com/en-US/library/ms.exch.eac.EXORPSMFAModuleLearnMore(EXCHG.150).aspx?v=15.1.860.4&l=1&s=BPOS_S_E15_0

Advertisements
 
 

Tags: , , , , , , , , ,

Office 365 – Access denied when trying to connect to Exchange Online PowerShell

When trying to connect to Exchange Online PowerShell using the code below with a global administrator account, I was getting an access denied error:

$usercredential = get-credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri<span class="Apple-converted-space"> </span>https://outlook.office3
65.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following
error message :
[ClientAccessServer=VI1PR08CA0018,BackEndServer=,RequestId=1c6b263f-08cf-4885-937c-e9c9808ddf89,TimeStamp=1/12/2017
2:46:41 PM] Access Denied For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed

I was able to succesfully logon to https://login.microsoftonline.com/ so the credentials were correct.
Also I had not enabled Multi-factor authentication because I knew this could be a problem.
I tried clearing credentials / cookies in browsers and credential manager.

Since this did not solve the issue, I started to search online for answers. The first result was : https://support.microsoft.com/en-gb/kb/2905767 which suggested I entered the wrong username/password or that I didn’t have the correct permissions (organization administrator).

Both where not the case.

I then came across this post where someone apparently had to reset the password: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin-mso_manage/exchange-online-remote-powershell-access-denied/b91205bf-3419-4251-badc-4181af701d4f , but this was also not the case for me.

So I tried using the new Exchange Online PowerShell module that supports Azure multi-factor authentication (MFA) and the Connect-EXOPSSession cmdlet which did seem to work.

As it turns out, I accidentally tried to logon using <domain>\username instead of using my User Principal Name (UPN). When using my UPN it worked perfectly.

As a bonus though, now I have no excuse anymore to start testing with MFA

For more information about the new Exchange Online PowerShell module that supports Azure multi-factor authentication (MFA) see: https://technet.microsoft.com/en-US/library/ms.exch.eac.EXORPSMFAModuleLearnMore(EXCHG.150).aspx?v=15.1.860.4&l=1&s=BPOS_S_E15_0

 
Leave a comment

Posted by on January 16, 2017 in Microsoft, Office, Office 365, Powershell

 

Tags: , , , , , , , ,

Microsoft Ignite 2015 : huge collection of information enhanced with more detailed resources to get you up-to-date with less time and effort

As some of you might know already, the Microsoft Ignite 2015 conference has started where Microsoft talks about where they’re going and what they’re doing. I watched the keynote, took many notes and added other relevant information which I’m sharing with you. Since so much was told and shown it’s certain I’ve missed stuff. As time goes by I will update the information in this post so it can be used as a reference.

I hope it’s useful. If you find any errors or have other useful resources or feedback, please leave a comment.

Update log:

-05-05-2015: Created Initial version including the keynote and additional information.

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Microsoft – Troubleshooting Key Management Service (KMS) activation

Today I helped a colleague troubleshoot a couple of systems were unable to activate using Key Management Service (KMS). Basically for this situation it boiled down to this:

Determine for the KMS service

  1. Which server is hosting the KMS service.If an SRV record has been added for KMS DNS auto discovery, run from CMD: nslookup -type=srv _vlmcs._tcp
  2. If the server hosting the KMS is functioning correctly:
  • Check if the server is up and running.
  • Check if the “Software Protection” service (sppsvc) is running.
  • Verify if the KMS service is listening on port 1688: telnet localhost 1688
  • Verify the KMS status. Run from CMD: slmgr.vbs /dli
  • Verify if a KMS key is installed and activated.
  • Verify if the minimum threshold for activation is being met.
  • Verify if other clients are able to activate using KMS. Even though the output of “slmgr.vbs /dli” gives you an indication, you can use the “Volume Activation Management Tool” (VAMT) for more insight and functionality.
  • Verify that a VLK key is being used.

For clients that are not able to activate

  • Verify if the correct KMS server can be resolved correctly:
    nslookup -type=srv _vlmcs._tcp
  • Verify if the KMS can be contacted:
    telnet <KMS FQDN or IP> 1688

    •  If this is not the case, perform a traceroute to determine potential causes. Reasons could include:
      • No default gateway configured on the client to reach the KMS.
      • No route configured on the client to reach the KMS.
      • Firewall on the client is blocking the traffic.
      • Firewall on the server is blocking the traffic.
      • If it is a VM, the virtual network might be misconfigured.
      • Routing on the network is not correct.
      • Firewall on the network is blocking traffic.
  • Clear any previous (mis)configuration: slmgr.vbs /ckms
  • Attempt activation: slmgr.vbs /ckms

NOTE: If you have lots of systems where you need to clear configuration and then attempt activation, you can also perform slmgr.vbs on remote computers using:
slmgr.vbs TargetComputerName [username] [password] /parameter [options]

Additional information

If you haven’t been able to resolve the issue, you might want to take a look here:

 

Tags: , , , , , , , , , , , , , , , , , , ,

Excel – Determine monthly payments for weekly activity with variable number of participants

For some time now, I’ve been playing indoor soccer with friends and colleagues on a weekly basis. To do so, we rent a location and split the costs. Because the people and the number of people vary, it is tedious work to keep track of who needs to pay how much. Especially because not everyone can/will pay at the same time.

Since I’m lazy, I’ve created an Excel spreadsheet to help with that:
http://bjornhouben-web.sharepoint.com/Lists/Files/DispForm.aspx?ID=18

Here’s what it looks like (click for full image):

It is easily customizable, so I hope it is useful to you as well.

 
Leave a comment

Posted by on July 8, 2013 in Excel, ICT, Microsoft, Office, Office 2013

 

Tags: , , , , , ,

Event – Free Microsoft IT Camps

On a regular basis Microsoft and its partners host Free IT Camps. In the past I’ve blogged about them because I really think they’re a good way to quickly get up-to-date on products and technologies. Besides that it’s also a good way to get to know other people.

On the Microsoft Events website you can see which future events are available and not just IT Camps events.

Also should you not be able to attend an IT Camp, for Server 2012 you can also use IT Camps On-Demand.

 

Tags: , , , , , , , , , , , , ,

 
%d bloggers like this: