2017-03-14

指定 VDI Golden Image VHDX 到 SSD Tier

$Path = "D:\VDI"

$Files = ((Get-ChildItem -path $Path -R) | where {$_.Name -like "*.vhdx"}).FullName
$SSDTier = (Get-StorageTier | where {$_.MediaType -eq 'SSD' -and $_.Size -gt 0} | Select FriendlyName).FriendlyName
foreach ($File in $Files) {
    Write-Host
    Write-Host "Move ""$File"""
    Write-Host " to  ""$SSDTier"""
    Write-Host
Set-FileStorageTier -FilePath $File -DesiredStorageTierFriendlyName $SSDTier
}

2017-03-02

Software List Remote (Enhanced Version)


' ----- 參數設定開始 -----

ADDomain = "contoso"
TargetFilePath = "D:\Info\Data\*.dbd"
GapString = "=====Gap====="
InfoString = "=====Info====="

' 除厝模式: (派送用戶端執行應設為 0)
' 0: 不顯示訊息
' 1: 顯示錯誤訊息
DebugMode = 0

' 資料取得方式 (此參數會在 DB Record 中註記):
' 1: Local - Client Push 檔案給 Server 讀取
' 2: Remote - Server 主動連線取得資料產生檔案
InfoDataType = 2

' 如果資料取得方式是 2: Server 主動連線取得資料產生檔案
' 此處給予客戶端有可能使用的管理員帳號密碼
AuthUserNameString = "contoso\Administrator;administrator;administrator;"
AuthPasswordString = "password;P@$$w0rd;P@$$P@##w0rd;"

' ----- 參數設定結束 -----