Wednesday, 26 July 2023

Upgrading Server License using DISM

[Updated Feb 2025] 

In this article, we are going to be upgrading a Servers OS from the standard evaluation edition to any other existing editions.

  1. First run PowerShell (elevated mode - optional).
  2. We want to know what editions are available for the server to upgrade to.
    The server I am currently using is running "Windows Server 2019 Standard Evaluation Edition."
    Run the command: DISM /Online /Get-TargetEditions

  3. We want to upgrade to the Datacenter edition. To do that we will need a product key. [1]

    Operating system edition                        Product Key                                                    
    Windows Server 2019 Datacenter WMDGN-G9PQG-XVVXX-R3X43-63DFG
    Windows Server 2019 Standard         N69G4-B89J2-4G8F4-WWYCC-J464C
    Windows Server 2019 Essentials         WVDHN-86M7X-466P6-VHXV7-YY726

  4. Run the command:
    DISM /Online /Set-Edition:ServerDatacenter /ProductKey:WMDGN-G9PQG-XVVXX-R3X43-63DFG /AcceptEula
    This will start the process of updating your Server.
Popular demand has it that Windows Server 2016 is a must use for light weight lab work hence, here are the codes to upgrade not only 2016 but also, Windows Server 2022.

Operating system edition                        Product Key                                                    
Windows Server 2016 Datacenter CB7KF-BWN84-R7R2Y-793K2-8XDDG
Windows Server 2016 Standard         WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY
Windows Server 2016 Essentials          JCKRF-N37P4-C2D82-9YXRT-4M63B       

Windows Server 2022 Datacenter WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Windows Server 2022 Standard         VDYBN-27WPP-V4HQT-9VMD4-VMK7H

Updated the name of the article to fit

I have already run this process on my AD server and was unable to grab a screenshot but otherwise the result would be your Server requiring a restart and then you will find your server as such:


Reference:


Special thanks to the good old GitHub lads, with the multiple posts on the little keys I shared here.






Friday, 21 July 2023

Disable All Browser Extensions using Group Policy

Environment:

-Windows Server 2019
-Windows 10 Client Machine

Note: Implementation for Chrome Extension blocking has already been done. For this example, we will be using Firefox.

Additionally: The goal for this is to block extensions for the following browsers-

  • Google Chrome
  • Microsoft Edge
  • Mozilla Firefox

Procedure:

A sort-of prerequisite for this is downloading multiple ADMX Templates. Each browser has their own set of features.

Chrome for example requires you to block by specific ID which is provided to every extension when they are added to the store. For our purposes we can simply block all extensions through the blocklist as shown on the screenshot below. An example of the client PC is also included for reference.




















Now moving forward, we will be setting up the policy for firefox.
Ultimately the same for all browsers, just a few different ways of addressing the block feature.

1. Download the Firefox ADMX template.
    Link: GitHub - mozilla/policy-templates: Policy Templates for Firefox
2. Extract the admx and adml files from the zip file.
3. Go to the following directory in your AD server:
    C:\Windows\PolicyDefinitions
4. Add the admx file to this location.
5. Go to the following directory:
    
C:\Windows\PolicyDefinitions\en-US
6. Add the adml file to this location.
With that you will have added the required templates to control the users browser.

Now for the group policy:
1. Open Group Policy Management.
2. Create a new GPO. The Demo policy here has been named "Firefox Extension".
3. Edit the new policy.
4. Go to User Configuration > Policies > Administrative Templates
5. Select the Mozilla template folder
6. Select Firefox > Addons > Allow add-on installs from websites
7. Set state to disabled.

8. Run gpupdate on both server and client.
Next time you open Firefox, you should be able to find extensions blocked as shown in the screenshot below.




The same can be done for Edge with the same method.





For ADMX templates, please refer to: https://admx.help/

-Leo







Thursday, 20 July 2023

Blocking PowerShell using Group Policy

Environment Information

AD server: Windows 2019 Server
Client PC: Windows 10

Procedure to disable PowerShell access for all users:

  • As a prerequisite, locate the PowerShell exe location. It is by default at the location provide below but just in case, open PowerShell, go to task manager and right click to open file location as shown on the screenshot below.
    File Path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe



  • Open Group Policy Editor and create a Group Policy Object.

  • Open the GPO editor for the new GPO and go to:
    User Configuration > Policies > Windows Settings > Security Settings > Software Restriction Policies 


  • Right click on Software Restriction Policies and add a new policy.

  • Select to add a new path rule.


  • Add the file path from earlier and apply.

  • Link the GPO to a specific OU and run gpupdate /force on both server and Client device.

  • When next you log on to client device and run PowerShell, the following pop-up should greet your screen:
     


Upgrading Server License using DISM

[Updated Feb 2025]  In this article, we are going to be upgrading a Servers OS from the standard evaluation edition to any other existing ed...