Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

Created Unassigned: new-scqueue - Unable to use -OR operator in Filter [11610]

$
0
0
The following error is thrown when attempting to use -OR operator in the Filter:

___new-scqueue : OR is not allowed, only '-AND'
At C:\Scripts\Duplicate_Queues.ps1:25 char:1
+ new-scqueue -name $queueName -ManagementPack $mp -Class $class -Filter $filter - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Status -ne 'Clo...b-8f3e95e19417':String) [New-SCQueue], InvalidOperationException
+ FullyQualifiedErrorId : Bad Filter,SMLets.NewSCQueueCommand___

An example to why you might need to add an OR operator:

Status != "Closed"
AND
Priority = "1"
AND
SupportGroup = Group1
OR
SupportGroup = Group2
OR
SupportGroup = Group3

Viewing all articles
Browse latest Browse all 306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>