MsgBox need help

Ask your PowerShell-related questions, including questions on cmdlet development!
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.
Posts: 3
Last visit: Sat Oct 24, 2020 2:15 pm

MsgBox need help

Post by dellaschm1972 »

I need to put a msgbox indicating if the command below was executed successfully or not

#$GroupTest = $textboxCheckGroup.Text
$textboxResultado.Lines = Add-ADGroupMember -Identity $textboxGroup.Text -Members $textboxLogin.Text

If the command execute successfully shows the msg in the popup: 'Access Released'
If the user already has group access, show the msg in the popup: 'User already has group access'
If the command does not execute successfully, displays the msg in the popup: 'Command not executed, check data entered'

Can you help me?
Thank you very much in advance

Posts: 14704
Last visit: Sat Feb 27, 2021 5:46 am
Answers: 8
Has voted: 2 times
Been upvoted: 6 times

Re: MsgBox need help

Post by jvierra »

This is a link that will help you when using WinForms. Look to the left for more articles:

MessageBox Control