Skip to content

Instantly share code, notes, and snippets.

$Results = New-Object -TypeName System.Collections.Generic.List[PSCustomObject]
$aryBlockSize = @("4K", "8K", "64K", "128K", "256K")
$aryThread = @(1,2,8,16)
$aryPattern = @("si", "r")
$duration = 60
$TestFile = "E:\test.dat"
$DiskSpd = "C:\Diskspd-v2.0.15\amd64fre\diskspd.exe"
$BaseCmd = "$DiskSpd -c10G -b{0} -o1 -h -t{1} -{2} {3} -Rxml -d{4} $TestFile"
tzutil.exe /s "Tokyo Standard Time"
$NewList = New-WinUserLanguageList -Language "ja-JP"
$NewList.Add("en-US")
Set-WinUserLanguageList $NewList -Force
Set-WinUILanguageOverride ja-JP
Set-WinHomeLocation 0x7A
Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\ -Name "LayerDriver JPN" -Value "kbd106.dll" -Type String
Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\ -Name "OverrideKeyboardIdentifier" -Value "PCAT_106KEY" -Type String
Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\ -Name "OverrideKeyboardSubtype" -Value 2 -Type DWord
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
$Server = "hogehoge"
$Login = "hogehoge"
$Password = "hogehoge"
$DBName = "hogehoge"
$TableName = "hogehoge"
$SQLServer = New-Object Microsoft.SqlServer.Management.Smo.Server($Server)