Identity $textboxGroup.Text

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.
This topic is 3 years and 1 month 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
DanielJohnson
Posts: 6
Last visit: Tue Feb 02, 2021 11:54 pm

Identity $textboxGroup.Text

Post by DanielJohnson »

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
User avatar
brittneyr
Site Admin
Posts: 1649
Last visit: Mon Mar 18, 2024 1:47 pm
Answers: 38
Been upvoted: 30 times

Re: Identity $textboxGroup.Text

Post by brittneyr »

You may find the following article helpful:
https://info.sapien.com/index.php/guis/ ... ox-control
Brittney
SAPIEN Technologies, Inc.
This topic is 3 years and 1 month 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