Posted On July 17, 2019

PowerShell: Send Private Message to Another Computer

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell: Send Private Message to Another Computer
$name = read-host "Enter remote computer name "
$messageInput = read-host "Enter your message to send to remote computer "
$prefix = "Message from $($env:computername) $($env:username)`: "
$msg = $prefix + $messageInput;
Invoke-WmiMethod -Path Win32_Process -Name Create -ArgumentList "msg * $msg" -ComputerName $name

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Add Root Domain to Trusted Sites

Windows Servers often have 'hard admin' modes, where accesses to external websites are painstakingly restricted.…

PowerShell: Install Visual Studio 2019 Community Version

# Install Chocolateyif (!(Get-Command choco.exe -ErrorAction SilentlyContinue)) {Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))}#…

PowerShell: Update Accounts Basing on CSV File

# adAccountsCsvUpdate.ps1 $originalCsvFile='C:\Users.csv' $newCsvFile='C:\Users-finalized.csv' $newEmailSuffix='@kimconnect.net' $newOu='CN=Users,DC=kimconnect,DC=com' function adAccountsCsvUpdate{ param( $originalCsvFile, $newCsvFile, $newEmailSuffix, $newOu ) function…