Add blank line to top of combobox

Gareth Davies 21 Reputation points
2020-08-20T15:32:20.883+00:00

I have a combobox showing all security groups in alphabetic order, the code used is:

$groups = Get-ADGroup -Filter 'GroupCategory -eq "Security"' | Select-Object -Expand name | sort-object 
$editusersecgroupentrybox.DataSource = $groups

This is part of a GUI used by the service desk to add users to groups.
I need to have the top line blank to prevent accidentally adding users to the first group in the list.
How can I add a blank line to the top of this?

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,154 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,446 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,596 Reputation points
    2020-08-20T18:49:35.05+00:00

    You asked this on your previous post. I provided an answer (and an example) there.

    1 person found this answer helpful.