Jump to content

CaffeinatedAdmin

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by CaffeinatedAdmin

  1. Hello, I've run into several topics about this but none of them seemed to have done it for me. Long story short, I am creating a GUI that will run my powershell scripts that I use in my every day work. The idea is to have a listbox with selections: Once selected, when the button is clicked, it will run a powershell script that checks the basic AD information on the computer object and return the output to an input box. This is my first time using the listbox so I am not sure what I'm doing wrong. This is the listbox section: ; ============ Scripts=========== Local $ListItem = GUICtrlRead($fList) Select Case $ListItem = "AD: Computer Object" $ADco = Run('powershell.exe -executionpolicy bypass -Command (get-adcomputer -Identity & ' $clctHostname & ' -Properties *)', '' , @SW_HIDE , 0x2) Local $ADcoOutput = StdoutRead($ADco) GUICtrlSetData ($fOutput,$ADcoOutput) Case $ListItem = "item2" MsgBox(0, "", "Text for Item 2") EndSelect ; ============ Scripts End =========== It's probably something silly, but I can't wrap my head around it. A fresh pair of eyes needed. Thanks in advance!
×
×
  • Create New...