Hi,
is there a way to build dynamically a Menustructure via Powershell Studio?
I want to add a menu called tools and add there sub menuitems which should open a RDP session to a server.
This should be dynamic.
Tools
- RDP Serverxyz
- RDP Server XXZ
- RDP Server YYZ
I get the Hostnames from a Powershell query.
Thanks
Regards
Andreas
Adding dynamically ToolstripMenuItems
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Adding dynamically ToolstripMenuItems
The following code adds an item to a menu strip dropdown
- #
- $item1ToolStripMenuItem = New-Object System.Windows.Forms.ToolStripMenuItem
- $item1ToolStripMenuItem.Name = 'item1ToolStripMenuItem'
- $item1ToolStripMenuItem.Size = '152, 24'
- $item1ToolStripMenuItem.Text = 'Item 1'