Confirmation challenge

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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.
This topic is 6 months and 4 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
GarethDavies
Posts: 8
Last visit: Thu May 02, 2024 9:03 am

Confirmation challenge

Post by GarethDavies »

I have a form used to create new user accounts (the idea was to make the creation process standard rather than the wild west we had before). This is working fine and does what I need. However, we have now discovered accounts are being added to groups they should not be added to. I have comboboxes listing security groups which the tech can select from, I want to add a confirmation challenge to make them confirm the groups selected are correct. Part of this is to try to stop the errant group memberships but also to introduce accountability.
I can't see any options in Powershell Studio for this, is it something I have to add in the script that runs when the create button is pressed or am I missing something?
User avatar
Lembasts
Posts: 433
Last visit: Mon Oct 21, 2024 2:59 pm
Has voted: 3 times
Been upvoted: 1 time

Re: Confirmation challenge

Post by Lembasts »

I use an old com object to display popups:

Code: Select all

		$wshell = New-Object -ComObject Wscript.Shell
		$wshell.Popup($Message, $Time, $Title, $ButtonValue + $iconValue)
Google that and you will get the object use.
User avatar
apowershelluser
Posts: 207
Last visit: Thu Oct 10, 2024 1:55 pm
Answers: 2

Re: Confirmation challenge

Post by apowershelluser »

There is a message box snippet, one with a yes/no too
This topic is 6 months and 4 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked