Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Broadcast Message with PowerShell ??

$
0
0

We still have over 1,000 Windows XP machines.  We are rolling out Windows 7 workstations but it will take a few months before XP is gone.   For broadcast messages to all systems NET SEND is used. this of course went away in Win7 replaced with the command MSG.     A tech who's no loner with our company wrote a custom .EXE that when run will prompt you for your "Message" and then NET SEND it out to all workstations.  Now that we have about 15% of our company running Win7 this is no longer a usable tool.    So I wanted to solve this problem with PowerShell.

 

I found this code online.

 

$Comp =  

"MG11706" 

$msg = "Place your message here" 

Invoke-WmiMethod -Path Win32_Process -Name Create -ArgumentList $msg -ComputerName $Comp

 

My problem with this is you need all machines in a .TXT file that you read and it would take a long time to cycle through it.  I don't know the inner workings of NET SEND but it would send the message all all machines within a 15 seconds.   

 

Can PowerShell mimic a NET SEND without reading a .TXT file of machine names?   Can it do what NET SEND used too and if so how?

 

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles