Archive for the ‘PowerShell’ Category

Activation: This edition cannot be upgraded

Have you ever installed a server evaluation version and later when trying to activate with a legitimate key received the “This edition cannot be upgraded” notification?

Using DISM you can troubleshoot and activate.

It’s recommended to use Powershell, but an elevated CMD window seems to work as well.

You can use the following 2 commands to determine the current version, and to which versions the system may be “upgraded”/changed:

DISM /online /Get-CurrentEdition

DISM.exe /Online /Get-TargetEditions

Assuming your license matches one of the target editions you can change and install the product key using:

DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula

A few important notes:

-It is very common for this to hang at 10% for quite a while. I find 10 to 30 minutes but there are those that report up to 24 hours.

-Verify the Software Protection service and the Windows License Manager services are set to automatic and running. The first may stop and start on its own as needed.

-When completed it usually requires 2 reboots to complete and the first reboot can be very slow. I have seen 6 hours.

-Though it usually automatically activates with this process, sometimes you have to manually activate after completion of the reboots. Running from the GUI does not work. You need to run from an elevated Command prompt using

Slmgr /ato

Should you need to troubleshoot, there is a log created in C:\Windows\Logs\DISM

More detailed information can be found on the microsoft site: Upgrade and Conversion Options for Windows Server 2016 | Microsoft Docs


Microsoft 365, Outlook, & MFA

When you enable multifactor authentication in Microsoft 365 (formerly Office 365) with an existing tenant, Outlook starts asking for a password and will not accept your current Microsoft 365 password.  You then need to use app passwords for Outlook, rather than standard MFA with your password and a second option such as the Microsoft Authentication app, Txt, E-mail, or call.  Those options work fine with access to Web and other Office Apps but not Outlook. See the following link to manage App Passwords;,password%2C%20and%20then%20select%20Next.%20More%20items…%20

You can however enable standard MFA methods for Outlook using powershell.  The credit for most of the instructions below goes to;

Instructions to enable MFA with Exchange On-line (paraphrased)

When asked for credentials, you need to use an O365 admin account that does not have MFA enabled.  I create one without an Office license just for this.

I use the PowerShell ISE but I suspect standard PowerShell run as admin will work as well

Connect to an Exchange PowerShell session by running the following 2 lines

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

This is not in the Petri link above, but you need to run the following line to allow running scripts

Set-ExecutionPolicy RemoteSigned

Test if MFA is already enabled.  Will return “false” if not enabled

Get-OrganizationConfig | ft name, *OAuth*

Assuming not enabled run

Set-OrganizationConfig -OAuth2ClientProfileEnabled:$true

Then run the following again to confirm now enabled, i.e. “True”

Get-OrganizationConfig | ft name, *OAuth*

Close session

Remove-PSSession $Session

I find it takes 30-60 minutes before the policy is applied and changes in use

Intro to PowerShell

For those not knowing where to start with learning PowerShell, Netwrix is offering a free 47 page document “Windows PowerShell Tutorial for Beginners” which includes numerous simple, common, tasks.  One of the best intros I have seen.

Tag Cloud