Computer Description with prompting
Comments
3 comments
-
This should do what you want.
[void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$title = 'Remote PC Description' #title diplayed on message box
$msg = 'Enter new description:' #message text displayed on message box
$text = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
$OSValues = Get-WmiObject -class Win32_OperatingSystem -computername "$(Computer:TARGETHOSTNAME)"
$OSValues.Description = $text
$OSValues.put()
Invoke-Command -ScriptBlock {pdqinventory ScanComputers -Computers "$(Computer:TARGETHOSTNAME)" -ScanProfile "Computer Info"}
exit
Please sign in to leave a comment.
I used this in the past to change computers using the Remote Command and a net config command. The problem is I was relying on it to be in the history of commands and then just modifying the text as needed. With the new PDQ 11 and how it allows for custom tools, how can I make this a command that I run on a remote computer and prompt me for what I want the description to be?
https://support.adminarsenal.com/hc/en-us/community/posts/211686687-Changing-computer-description-from-within-PDQ