I am new to PowerShell. I started learning it a few days ago.
I know my question my be dumb, I was wondering if any of you can help me.
I was using Exchange Management Shell and I trying to change a PramaterType called UseDatabaseQutaDefaults as $True for a user.
I had assigned the user’s mailbox to a variable $s. The reason was b/c I want to be able to assigned multiple names or use the Get-Content in the future if I have a bulk of users.
$s = Set-Mailbox Test.User
Commands that I tried changing the UseDatabaseQuotaDefaults
$s UseDatabaseQuotaDefaults $True
$s -UseDatabaseQuotaDefaults $True
I’m getting the following error
Missing expression after unary operator ‘-’.
At line:1 char:7
- $s | - <<<< UseDatabaseQuotaDefaults $true
- CategoryInfo : ParserError: (-:String) , ParentContainsErrorRecordException
- FullyQualifiedErrorId : MissingExpressionAfterOperator
I was wondering if someone can explain to me why this doesn"t work. I"m exploring PowerShell right now to see what other ways I can do it.
I know it works if i do "Set-Mailbox Test.User -UseDatabaseQuotaDefaults $True