Pass form text in quotes to cmdlet
Posted: Tue Mar 18, 2014 6:48 pm
I might be looking at this wrong but here is what I want to do.
In powershell:
Get-MailboxPermission -Identity user-name@domain.com -User "domain\first middel last"
| Format-Wide -Property "AccessRights" -Column 2 | Out-String
It request me to pass the user name in quotes "domain\first middle last"
I built a very simply hello world form that request the account and a user name to check access for. Then output that to a text box on the form. It seems I having problems with the user name needing to be in quotes.
$GetAccess_Click={
#TODO: Place custom script here
$textboxresults = Get-MailboxPermission -Identity $EmailAccount.Text -User $adaccount.text | Format-Wide -Property "AccessRights" -Column 2 | Out-String
}
Thanks for the help.
In powershell:
Get-MailboxPermission -Identity user-name@domain.com -User "domain\first middel last"
| Format-Wide -Property "AccessRights" -Column 2 | Out-String
It request me to pass the user name in quotes "domain\first middle last"
I built a very simply hello world form that request the account and a user name to check access for. Then output that to a text box on the form. It seems I having problems with the user name needing to be in quotes.
$GetAccess_Click={
#TODO: Place custom script here
$textboxresults = Get-MailboxPermission -Identity $EmailAccount.Text -User $adaccount.text | Format-Wide -Property "AccessRights" -Column 2 | Out-String
}
Thanks for the help.