Computer Description with prompting

Comments

3 comments

  • J.B. Cummings

     

     

    0
    Comment actions Permalink
  • Nate Blevins

    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
    Comment actions Permalink
  • J.B. Cummings

    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
    Comment actions Permalink

Please sign in to leave a comment.