如何使用powershell輸入密鑰然後激活Windows 2008 R2安裝?使用Powershell激活Windows 2008 R2服務器
1
A
回答
1
試試這個:How to Activate Windows 7 Through PowerShell
步驟3:
$service= get-wmiObject -query "select * from SoftwareLicensingService" -computername
計算機替換 「計算機」 計算機名。第4步:安裝許可證密鑰。以下代碼將Windows激活許可證添加到計算機:
$service.InstallProductKey($key)
和$service.RefreshLicenseStatus()
。用您的Windows許可證密鑰替換$key
。
1
我用slmgr
效用 - 如下所述:使用的Cscript.exe/B
- Slmgr.vbs Options
- 實施例來禁止顯示提示:
cscript.exe /B "c:\windows\system32\slmgr.vbs" -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX -ato
在這裏:
1
我在2008 R2有同樣的確切問題。這就是我所做的。
$all_services = Get-WmiObject -Query "SELECT * FROM SoftwareLicensingService"
$all_services.InstallLicense($key)
$service = Get-WmiObject SoftwareLicensingProduct | Where-Object {$_.PartialProductKey}
$service.Activate()
$all_services.RefreshLicenseStatus()
現在,我不確定爲什麼$ service沒有安裝方法。這可能是一種更有效的方法,但關鍵是您需要在刷新之前調用activate方法。
相關問題
- 1. 使用Windows服務讀取/更新SQL服務器2008 R2
- 2. php_mcrypt擴展爲Windows服務器2008 R2
- 3. 鏈接服務器2008 R2
- 4. 從Windows 2008 R2的Web服務器指向遠程服務器
- 5. 如何在Windows 2008 R2服務器中使用runas命令?
- 6. Windows服務器2008 R2服務錯誤1053
- 7. Windows服務總線與SQL Server 2008 R2
- 8. 402.2.1260 IIS7 Windows Server 2008 R2 Web服務
- 9. 使.dep文件在Windows服務器2008 R2上工作
- 10. Crystal Reports掛在服務器2008 r2上
- 11. 顯示窗口服務器2008 R2
- 12. Windows服務器2008 R2 Active Directory和Windows 10 Pro客戶端
- 13. Windows服務器2008 R2上的powershell 2.0無法連接到OLEDB連接
- 14. Windows進程激活/ Windows服務
- 15. Windows服務器2008 R2 Active Directory無法啓用LDAPS
- 16. 適用於Windows Server視頻會議服務器2008 R2
- 17. Windows服務器2008 r2任務計劃程序
- 18. Windows 2008 R2計劃任務
- 19. Windows Server 2008 R2 PowerShell和Internet Explorer 9
- 20. 激活/取消激活遠程機器上的Windows NT服務器
- 21. Dom Config故障服務器2008 r2
- 22. 在Windows Server 2008 R2中啓用Windows部署服務
- 23. axis2 1.6.2.war Tomcat服務器7.0部署Windows 2008 R2內部服務器錯誤
- 24. Xampp在贏得服務器2008 R2
- 25. Windows服務器2008 R2上的.NET Framework 4 RTM
- 26. 如何防止代碼注入Windows服務器2008 R2 .aspx
- 27. Windows Server 2008 R2上的VMWare服務器的替代
- 28. 的DataSnap/DCOM的Windows Web服務器2008 R2
- 29. 查明Windows 2008 R2生產服務器出了什麼問題
- 30. Filezilla服務器不能在Windows Web Server 2008 R2上工作
GUI仍然顯示沒有激活時,這樣做 –
@KyleBrandt:不幸的是,我沒有辦法測試它,但你做'RefreshLicenseStatus'?此外,您是否嘗試完成這些步驟後重新啓動機器? – Neolisk