@@ -47,32 +47,34 @@ Once you're logged in the management machine, simply paste following PowerShell
4747
4848#region install keys and activate servers
4949
50- $LicenseKey="2KNJJ-33Y9H-2GXGX-KMQWH-G6H67"
50+ $LicenseKey="2KNJJ-33Y9H-2GXGX-KMQWH-G6H67"
5151
52- cscript c:\windows\system32\slmgr.vbs /ipk $using:LicenseKey
52+ #install and activate on Management machine
53+ cscript c:\windows\system32\slmgr.vbs /ipk $LicenseKey
5354 cscript c:\windows\system32\slmgr.vbs /ato
5455
55- Invoke-Command -ComputerName $Servers -ScriptBlock {
56- cscript c:\windows\system32\slmgr.vbs /ipk $using:LicenseKey
57- cscript c:\windows\system32\slmgr.vbs /ato
58- }
56+ #install and activate on cluster nodes
57+ Invoke-Command -ComputerName $Servers -ScriptBlock {
58+ cscript c:\windows\system32\slmgr.vbs /ipk $using:LicenseKey
59+ cscript c:\windows\system32\slmgr.vbs /ato
60+ }
5961
60- #check status
61- Get-CimInstance SoftwareLicensingProduct -CimSession $Servers |
62- Where-Object { $_.PartialProductKey -and $_.ApplicationID -eq '55c92734-d682-4d71-983e-d6ec3f16059f' } |
63- Select-Object Name, Description, LicenseStatus, PartialProductKey, PSComputerName,
64- @{N='LicenseStatusText';E={
65- switch ($_.LicenseStatus) {
66- 0 {'Unlicensed'}
67- 1 {'Licensed'}
68- 2 {'OOBGrace'}
69- 3 {'OOTGrace'}
70- 4 {'NonGenuineGrace'}
71- 5 {'Notification'}
72- 6 {'ExtendedGrace'}
73- default {'Unknown'}
74- }
75- }}
62+ #check status
63+ Get-CimInstance SoftwareLicensingProduct -CimSession $Servers |
64+ Where-Object { $_.PartialProductKey -and $_.ApplicationID -eq '55c92734-d682-4d71-983e-d6ec3f16059f' } |
65+ Select-Object Name, Description, LicenseStatus, PartialProductKey, PSComputerName,
66+ @{N='LicenseStatusText';E={
67+ switch ($_.LicenseStatus) {
68+ 0 {'Unlicensed'}
69+ 1 {'Licensed'}
70+ 2 {'OOBGrace'}
71+ 3 {'OOTGrace'}
72+ 4 {'NonGenuineGrace'}
73+ 5 {'Notification'}
74+ 6 {'ExtendedGrace'}
75+ default {'Unknown'}
76+ }
77+ }}
7678#endregion
7779
7880#region install required features
0 commit comments