how to get alert that a vm is up ?
hi guys, how alert when tenant vm getting up?
hi weili,
to check if vm up, recommend can use scheduled task, , can schedule trigger time, run powershell script check event id 18500 to monitor running vm, call function based on vmname.
for example, if set scheduled task run every 1 hour, can filter starttime of the event logs by an hour ago, parse vmnames.
get-winevent -filterhashtable @{logname="microsoft-windows-hyper-v-worker-admin";id=18500;startt ime = (get-date).addhours(-1)}|foreach{ $_.message.split("'")[1]} #then call function based on vm names
if there else regarding issue, please feel free post back.
best regards,
anna wang
Windows Server > Windows PowerShell
Comments
Post a Comment