Get OS License Details using PowerShell

In this post, I will show you how to get OS license details using PowerShell. This script helps you find the operating system license information such as Windows product key, license status, license URL, and much more.

OS licenses are contracts that grant users the right to access and use the software. Administrators must make sure that these licenses are used in accordance with the organization’s policies. This includes making sure that the right number of licenses are being used and that the licenses are legitimate and not infringed.

When you have multiple computers in your setup, it takes time to manually check each device’s license information. Hence, a handy PowerShell script is what you need to get the license details on the operating system.

In one of my blog posts, I covered on multiple ways to activate Windows 11. PowerShell can be used to find out most of the details about the OS, including the license information. You can run different PowerShell commands to find out about the OS license. For example, you can run the following PowerShell command to get the product key for Windows 11 “(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey“.


https://ourpoliticalhammer.com/mybb/showthread.php?tid=21691

https://socalireefer.com/forum/showthread.php?tid=405628

https://ninitime.com/community/showthread.php?tid=140858

https://ciclistiurbani.re-bike.it/forum/showthread.php?tid=8

http://forum.badcity.live/showthread.php?tid=26

https://demo.projecthades.org/showthread.php?tid=371

https://www.gamingfraternity.com/showthread.php?tid=14925

http://chateaugarom.free.fr/anime/forum/viewtopic.php?p=2816

http://chateaugarom.free.fr/anime/forum/viewtopic.php?p=1495

http://chateaugarom.free.fr/anime/forum/viewtopic.php?p=2568

http://www.skillcoach.org/forums/topic/300813/acheter-cipro-ou-acheter-du-cipro

http://www.skillcoach.org/forums/topic/419503/como-preparar-bacalhau-como-comprar-tesouro-selic

https://forum-old.soria2.pl/index.php?/topic/2982-domino-s-pizza/

https://forum-old.soria2.pl/index.php?/topic/3025-vlad-portnoy-point72/

https://forum.freeisrael.org.il/viewtopic.php?t=47724

https://forum.freeisrael.org.il/viewtopic.php?t=63268

https://forum.freeisrael.org.il/viewtopic.php?t=117982

https://www.dragon1616.com/index.php?topic=13051.0

https://www.dragon1616.com/index.php?topic=13091.0


Before you read further, check out some really useful PowerShell guides.


  1. How to Uninstall Windows Updates using PowerShell
  2. List all Azure Regions using PowerShell | Azure Cloud Shell
  3. List of Useful TPM PowerShell CmdLets
  4. How to Unlock User Accounts with PowerShell


Get OS License Details using PowerShell


We’ll now go through the steps to get OS license details using PowerShell which will retrieve important license details of the operating system. The following script will fetch license details like license name, Description, Application ID, Product Key Channel, License URL, Validation URL, Partial Product Key, Product Key ID, License Status, and Product Key. You can download this script from my GitHub repository.

Copy the below PowerShell script to a notepad or text editor and save it as GetOSlicensedetails.ps1.

To run the above PowerShell script, launch the PowerShell as administrator. To accomplish this, click Start and type ‘PowerShell‘ in the search box. From the list of results, select PowerShell and choose the option Run as administrator.

In the PowerShell window, run the getosdetails.ps1. The PowerShell output now displays the following OS license information.


  • License name
  • Descriptions
  • Application ID
  • Product Key Channel
  • License URL
  • Validation URL
  • Partial Product Key
  • Product Key ID
  • License Status
  • Product Key

https://www.dragon1616.com/index.php?topic=13813.0

https://www.63game.top/thread-4293-1-1.html

https://63game.top/thread-5900-1-1.html

https://www.63game.top/thread-3813-1-1.html

http://forums.fanntic.com/viewtopic.php?t=57364

http://forums.fanntic.com/viewtopic.php?f=10&t=63144

https://forums.fanntic.com/viewtopic.php?t=114806

http://www.tnfnorth.com/viewtopic.php?t=33766

https://www.tnfnorth.com/viewtopic.php?t=542365

https://www.tnfnorth.com/viewtopic.php?t=6397

http://www.linuxmint-hispano.com/foro/index.php?topic=77814.0

http://www.linuxmint-hispano.com/foro/index.php?topic=85662.0

http://www.linuxmint-hispano.com/foro/index.php?topic=8926.0

http://forum.micmedia.ru/viewtopic.php?f=28&t=6073

http://forum.micmedia.ru/viewtopic.php?f=28&t=7683

https://forum.jarisium.com/index.php?topic=30668.0


How to Uninstall Windows Updates using PowerShell


In this article, I will show you how to uninstall Windows updates using PowerShell. You can list all the updates installed on your Windows computer using PowerShell and remove the updates using the KB number.

Microsoft periodically releases updates, some of which are intended to resolve specific problems, but others of which unintentionally cause new problems. We have witnessed this occurring multiple times, which is why the majority of IT administrators choose to delay the deployment of new updates.

The updates that you want to uninstall may have been deployed via SCCM or you may have manually imported the update into WSUS from Microsoft Update Catalog. In case the update that you want to remove is installed using Configuration Manager, you can roll back a patch via SCCM.

If the update is causing issues on the computer, the only solution is to uninstall that problematic update. Your first goal is to find the update(s) that is causing issues when you update your Windows 10/11 computers. By looking at the updates that were installed on a particular date, you can do it quickly. Either you have to find the problematic update(s) and uninstall it, or you have to wait for Microsoft to release a separate patch. You can uninstall specific Windows updates using PowerShell if you realize it’s causing problems with the PC.


How to Uninstall Windows Updates using PowerShell


Let’s look at the steps to uninstall Windows updates using PowerShell.


Step 1: Click Start and Launch the PowerShell as administrator. In the PowerShell window, run the below command. The below command lists all the updates installed on Windows computers.


The above command lists the following details in the output:


  • Update Description: Whether it’s a security update or an update.
  • HotfixID: The KB number of the update.
  • InstalledBy: The user account that installed the update.
  • InstalledOn: The date on which the update was installed.


Step 2: From the list of installed updates, make a note of the hotfix ID that you wish to remove. Next, in the PowerShell window, run the below command to uninstall the update.


Note: Replace the UpdateID with the actual KB Update ID, from the list and then hit enter. This command will uninstall the Update.


The above command uses Windows Update Standalone Installer (Wusa.exe) to uninstall Windows Updates from the computer. The Wusa.exe file is located in the %windir%\System32 folder.


Step 3: After you run the above command, you need to confirm the removal of the update. On the Windows Update Standalone installer, you see “Do you want to uninstall the following Windows software update?” Select Yes to proceed with uninstalling the update.


Step 4: It takes just a few seconds to uninstall the update. Most updates require a reboot when you uninstall them. To restart the computer, select Restart Now. With these steps, you can easily uninstall Windows Updates using PowerShell.


https://forum.jarisium.com/index.php?topic=179694.0

http://yonghengro.gain.tw/redirect.php?tid=376912&goto=lastpost

http://010-5298-7457.aaad.kr/bbs/board.php?bo_table=inquiry&wr_id=65302

https://www.wolala.love/thread-44746-1-1.html

http://eldoradofus.free.fr/forum/viewtopic.php?pid=12111

http://eldoradofus.free.fr/forum/viewtopic.php?pid=11055

http://thaoduocquyhcm.com/diendan/threads/thu%E1%BB%91c-d%E1%BA%A1-d%C3%A0y-b%C3%ACnh-v%E1%BB%8B-nam-vi%E1%BB%87n-354-kh%E1%BA%AFc-tinh-c%E1%BB%A7a-b%E1%BB%87nh-%C4%90au-d%E1%BA%A1-d%C3%A0y.125319/

http://thaoduocquyhcm.com/diendan/threads/t%E1%BB%95ng-h%E1%BB%A3p-%E1%BA%A3nh-n%C3%A2ng-ng%E1%BB%B1c-c%E1%BB%A7a-ch%E1%BB%8B-em.125383/

http://junlinro520.gain.tw/viewthread.php?tid=313023&extra=

http://junlinro520.gain.tw/viewthread.php?tid=309791&extra=

http://junlinro520.gain.tw/viewthread.php?tid=323759&extra=


Unable to Uninstall Updates using PowerShell?


In some cases, you cannot uninstall certain updates such as Servicing Stack updates using PowerShell. In the screenshot below, we are attempting to remove the patch KB5025749 from the computer using the following command.

The following error is displayed as a result of the update’s failure to uninstall: “Servicing Stack update is required by your machine and cannot be uninstalled.” You are unable to delete a servicing stack Update from your computer since your machine needs it, which is why you are seeing this message.

Servicing stack updates improve the reliability of the update process to mitigate potential issues while installing the latest quality updates and feature updates. If you don’t install the latest servicing stack update, there’s a risk that your device can’t be updated with the latest Microsoft security fixes.


Comments

Popular posts from this blog

Display Lock Screen Message for MacOS Users using Intune

Fix Intune Win32 App Deployment Error 0x87D1041C

The most effective method to Install Games on Your Computer