File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 22# Found from internet. Need to review and cleanup.
33
44# Activate Windows
5- $ProductKey = (Get-WmiObject - Class SoftwareLicensingService).OA3xOriginalProductKey
6- Invoke-Expression " cscript /b C:\Windows\System32\slmgr.vbs -ipk $Productkey "
5+ $ProductKey = (Get-CimInstance - ClassName SoftwareLicensingService).OA3xOriginalProductKey
6+ Invoke-Expression " cscript /b C:\Windows\System32\slmgr.vbs -ipk $ProductKey "
77Start-Sleep 5
88Invoke-Expression ' cscript /b C:\Windows\System32\slmgr.vbs -ato'
99
1010
1111
1212# Define the registry key path and value
1313$registryPath = ' HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MfaRequiredInClipRenew'
14- $registryValueName = ' Verify Multifactor Authentication in ClipRenew'
14+ $registryValueName = ' Verify Multi-factor Authentication in ClipRenew'
1515$registryValueData = 0 # DWORD value of 0
1616$sid = New-Object System.Security.Principal.SecurityIdentifier(' S-1-5-4' )
1717# SID for the Everyone group
@@ -37,6 +37,4 @@ Write-Output "Added 'Interactive' group and SID ($sid) with read permissions (wi
3737# Remove the # below to make sure it will kick off the scheduled task on already enrolled devices
3838Start-Process " $env: SystemRoot \system32\ClipRenew.exe"
3939
40-
41-
42- $ProductKey = (Get-WmiObject - Class SoftwareLicensingService).OA3xOriginalProductKey
40+ $ProductKey = (Get-CimInstance - ClassName SoftwareLicensingService).OA3xOriginalProductKey
You can’t perform that action at this time.
0 commit comments