Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

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?

https://support.adminarsenal.com/hc/en-us/community/posts/211686687-Changing-computer-description-from-within-PDQ

0

Comments

3 comments
Date Votes
  •  

     

    0
  • 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

    0
  • 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

    0