Problem scheduling SafeList Aggregation
Hello, I receive an error when I try to set the scope in a script for Safelist Aggregation:Property 'DefaultScope' cannot be found on this object; make sure it exists and is settable.At C:\admin\test.ps1:2 char:25+ $AdminSessionADSettings. <<<< DefaultScope = "CORP.SOUND.ORG" + CategoryInfo : InvalidOperation: (DefaultScope:String) [], Runt imeException + FullyQualifiedErrorId : PropertyNotFoundHere's the command: powershell -noexit -command "& 'c:\admin\test.ps1' "This is the test.ps1 script:Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin$AdminSessionADSettings.DefaultScope = "CORP.SOUND.ORG"get-mailbox | where {$_.RecipientType -eq [Microsoft.Exchange.Data.Directory.Recipient.RecipientType]::UserMailbox } | update-safelistAny help would be appreciated.Thank you
February 3rd, 2010 4:51am

We cannot add the DefaultScope to the test.ps1 script, since it loads before $AdminSessionADSettings is defined in exchange.ps1 The option would be to set it globally on the exchange.ps1 object in the bin folder ## EXCHANGE VARIABLEs ######################################################## … $global:AdminSessionADSettings.ViewEntireForest = $false $global:AdminSessionADSettings.DefaultScope = "CORP.SOUND.ORG" $FormatEnumerationLimit = 16 ## PROMPT ####################################################################James Luo TechNet Subscriber Support (http://technet.microsoft.com/en-us/subscriptions/ms788697.aspx) If you have any feedback on our support, please contact tngfb@microsoft.com
Free Windows Admin Tool Kit Click here and download it now
February 8th, 2010 10:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics