Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

problem with variables input

$
0
0

Hi,

I build a form that the user write a number in the windows, when he click the button, this value

is the new prohibit Send quota in the MailBox.

part of the script:

$ChangeButton.add_click(

{

[int]$NewProSendQuota=$prohibitSendquotaValue.Text

Set-Mailbox $UserName -ProhibitSendQuota $NewProSendQuota

})

the problem is that if i type in the window 5000 the command Set-Mailbox see it like that: 5000B

and I get an error:

"... The value of property 'ProhibitSendQuota' must be greater than or equal to that of property 'IssueWarningQuota'. ProhibitSendQuota: '50000B', IssueWarningQuota: '4400KB'."

 

I think he show the value in bites, how I can define the variable $NewProSendQuota that the input is in KB?

 

Thanks

Lior

 

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles