2024-06-12 17:15:02 +00:00
|
|
|
function Invoke-Wake($Computer) {
|
2024-06-13 00:28:26 +00:00
|
|
|
if (-not (Get-Module ConfigurationManager)) {
|
|
|
|
|
Write-Warning "ConfigurationManager module not available! Please install Configuration Manager Console to use this feature"
|
|
|
|
|
return
|
|
|
|
|
}
|
2024-06-12 17:15:02 +00:00
|
|
|
Write-Host "Attemping to wake up $Computer, check in a few minutes"
|
|
|
|
|
Push-Location
|
|
|
|
|
Set-Location "$(Get-PSDrive -PSProvider CMSite)`:"
|
|
|
|
|
Invoke-CMClientAction -DeviceName $Computer -ActionType ClientNotificationWakeUpClientNow
|
|
|
|
|
Pop-Location
|
|
|
|
|
}
|