I have this script to create a popup on the workstation. However 1) it required elevation to show more than one popup and 2) I need this to run on the server.
Register-ObjectEvent $fsw Created -SourceIdentifier FileCreated -Action {
$name = $Event.SourceEventArgs.Name
$changeType = $Event.SourceEventArgs.ChangeType
$timeStamp = $Event.TimeGenerated
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup("The file '$name' was $changeType at $timeStamp",0,"Done",0x1)
#Write-Host "The file '$name' was $changeType at $timeStamp" -fore green
Out-File -FilePath c:\outlog.txt -Append -InputObject "The file '$name' was $changeType at $timeStamp"}
Is it possible to modifiy this so it will send a pop message using the msg.exe command to pre-determined workstations?
If so, any pointers? I'm lost.
Thanks