mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-14 14:27:22 +00:00
Adding PowerShell alternative since WMIC is not supported on Win11
This commit is contained in:
parent
c521c127a4
commit
be6ac5a4be
@ -249,6 +249,11 @@ changepk.exe /ProductKey %ProductKey%
|
||||
)
|
||||
```
|
||||
|
||||
Since [WMIC was deprecated](https://docs.microsoft.com/windows/win32/wmisdk/wmic) in Windows 10, version 21H1, run this PowerShell alternative:
|
||||
```console
|
||||
$(Get-WmiObject SoftwareLicensingService).OA3xOriginalProductKey | foreach{ if ( $null -ne $_ ) { Write-Host "Installing"$_;.\changepk.exe /Productkey $_ } else { Write-Host "No key present" } }
|
||||
```
|
||||
|
||||
### Obtaining an Azure AD license
|
||||
|
||||
Enterprise Agreement/Software Assurance (EA/SA):
|
||||
|
Loading…
x
Reference in New Issue
Block a user