Skip to content

Commit e69154f

Browse files
SamErdeCopilot
andcommitted
🧹 chore(function): remove dead code re-fetch of ProductKey at EOF
F03: The final line re-fetched \ via Get-CimInstance but the value was never used. The variable is already assigned earlier in the script where it is consumed by Invoke-Expression slmgr.vbs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 23f3ffe commit e69154f

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

Windows/Activate and Get License.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ Write-Output "Added 'Interactive' group and SID ($sid) with read (ReadKey) permi
3636

3737
#Remove the # below to make sure it will kick off the scheduled task on already enrolled devices
3838
Start-Process "$env:SystemRoot\system32\ClipRenew.exe"
39-
40-
$ProductKey = (Get-CimInstance -ClassName SoftwareLicensingService).OA3xOriginalProductKey

0 commit comments

Comments
 (0)