2019-02-27

Install SQL on Server Core

先用 Standard / Enterprise 版產生 ConfigurationFile.INI
*. Express 版本安裝 GUI 沒有一個 (Ready to Install 的步驟可以停下來產生 .ini 檔)
取得 ConfigurationFile.INI 後進行以下變更


有關磁碟機 Drive 的一些 PowerShell 指令

指定光碟機為 Z:

Get-WmiObject -Class Win32_volume -Filter 'DriveType=5' | Select-Object -First 1 | Set-WmiInstance -Arguments @{DriveLetter='Z:'}
改好後須 Reboot (或有什麼 Command 可以移除舊的 Drive Letter?)

將 Disk Online

Get-Disk | where {$_.OperationalStatus -eq "Offline"} | Set-Disk -IsOffline $False

變更分割區磁碟代號

Get-Disk -Number 1 | Get-Partition -PartitionNumber 2  | Set-Partition -NewDriveLetter D

2019-02-21

KMSHost Install

Windows Server
slmgr.vbs /ipk KMS-Key
slmgr /ato

Office 2010
https://www.microsoft.com/en-us/download/confirmation.aspx?id=25095
slmgr.vbs /ipk KMS-Key
Office 2010: slmgr /ato BFE7A195-4F8F-4F0B-A622-CF13C7D16864

Office 2013
https://www.microsoft.com/de-ch/download/details.aspx?id=49164
slmgr.vbs /ipk KMS-Key
slmgr /ato 2E28138A-847F-42BC-9752-61B03FFF33CD

Office 2016
https://www.microsoft.com/de-ch/download/details.aspx?id=49164
slmgr.vbs /ipk KMS-Key
slmgr /ato 98EBFE73-2084-4C97-932C-C0CD1643BEA7

Office 2019
https://www.microsoft.com/de-ch/download/details.aspx?id=57342
slmgr.vbs /ipk KMS-Key
slmgr /ato 70512334-47B4-44DB-A233-BE5EA33B914C

Office 2010 KMS Host Package 無法安裝在 Windows Server 2016 以上版本的解決:
執行後在 C:\Program Files (x86)\MSECache\OfficeKMS 取得 kms_host.vbs
修改後直行即可
Search: If (Ver(0) = "6" And Ver(1) >= "2") Or (Ver(0) >= "7") Then
Replace: If (Ver(0) = "6" And Ver(1) >= "2") Or (Ver(0) >= "7") Or (Ver(0) => "10") Then