question

jayk-0083 avatar image
0 Votes"
jayk-0083 asked NewbieJones-6218 commented

Need help for powershell script

Powershell script to verify default computer container in AD and send popup message to all the devices which are located in default computer container

windows-server-powershellwindows-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

Use Get-ADComputer to get the computer information. Use the DOS command "msg /SERVER:target-computer" to send to the computer. There are parameters to the MSG command for how long the message should be displayed, the data you want to display on the computer, and the sessions on the computer that should receive the message.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jayk-0083 avatar image
0 Votes"
jayk-0083 answered NewbieJones-6218 commented

ok, thanks for the information, I am looking to include both in the powershell script, so that the output of the get-adcomputer can be used to send the message. Any idea would be helpful

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Post what your script is already doing.

0 Votes 0 ·

You can call DOS commands from a PowerShell scripts.

One thing I would mention is that its possible that the MSG command may be blocked by local firewall policies or other restrictions.

0 Votes 0 ·