Computer Description with prompting
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?
0
Comments
I'll see if i can figure that out for you. Give me some time to work on it and i'll get back with you.
Nate
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