Need help for powershell script

jay k 21 Reputation points
2022-07-04T15:07:23.047+00:00

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

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,841 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,361 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 44,776 Reputation points
    2022-07-05T01:43:23.45+00:00

    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.

    0 comments No comments

  2. jay k 21 Reputation points
    2022-07-05T13:33:26.413+00:00

    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