Long time lurker, now I have an issue of my own. I know this will start to sound like an SCCM issue, but it’s a PowerShell command I need to run to assist with the SCCM stuff.
I run an in-house SCCM server and I am trying to get an N-Able agent automatically installed during a task sequence. The issue is that the agent needs the customer/site ID in the install command in order to correctly report back to the right area. So far I’ve come across the how-to guides on
- Pausing a task sequence to have the PXE operator choose a particular customer/site from N-Able,
- How to have a script run during the paused task sequence (such as a user-interaction GUI),
- How to query the N-Able API to output all customer/sites to a .csv file (which includes the customer/site ID in a separate column)
- How to create the script to create a drop-down menu in a GUI from a PowerShell script and set the selection to a variable that can be called later, retrieving the customer/sites from a particular column in the .csv and using them as the items in the drop-down menu – which will be used at the paused task sequence.
The .csv file is set out in the following format:
and so on and so forth.
Currently, the script to populate the list in the drop-down menu is using the Customer_Site column, but I need to somehow have the two columns (ID + Customer_Site) related in order to have ExampleSite selected, and have the variable set to ‘2’.
Bonus points would be to assist with how to format the drop-down menu so that it shows the Customer_Site objects without a ‘ParentID’ in bold, with the corresponding child site’s show in plain text below the ParentID site, (This is because the ID field is populated in sequential order, and ID 45 might be a new site for the Customer at ID 1 but was created later on) like the following:
If I can get these done, I will definitely shout a beer or two with some crypto to any and all that help.
Any assistance would be greatly appreciated!!