Page 1 of 1

MsgBox need help

Posted: Fri Oct 23, 2020 9:22 am
by dellaschm1972
Hello,
I need to put a msgbox indicating if the command below was executed successfully or not

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

Example:
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

Re: MsgBox need help

Posted: Fri Oct 23, 2020 3:33 pm
by jvierra
This is a link that will help you when using WinForms. Look to the left for more articles:

MessageBox Control