摘要:
[system.Reflection.Assembly]::LoadWithPartialName("System.ServiceProcess")|out-NullfunctionGet-ServiceStartupMode{param([string]$servicename,[string]$serverName)$startMode=gwmiwin32_service-filter"NAME='$servicename'"-computername$serverName|Select-PropertyStartMode$start 阅读全文