PowerShell在處理Windows服務(wù)方面,提供了強(qiáng)大的功能,很多方便、強(qiáng)大的cmdlet等著你去光顧。 Get-Service,別名gsv,獲取服務(wù)對象。 舉例:gsv eventlog 或 $evtlog = gsv eventlog Start-Service,啟動服務(wù)。 Stop-Service,停止服務(wù)。 Restart-Service,重啟服務(wù)。 Suspend-Service,掛起/暫停服務(wù)。 Resume-Service,繼續(xù)服務(wù)。
www.dbjr.com.cn/article/535...htm 2025-5-25