New-CMSchedule and -DayOfWeek

I'm trying run the following to configure discovery in ConfigMgr 2012 R2, but get an error with the schedule.  What am I doing wrong?  If I use a 7 day cycle instead of trying the -DayOfWeek options, everything works. I want discovery to run every Sunday at 4:00 AM.

Cannot bind argument to parameter 'PollingSchedule', because PSTypeNames of the argument do not match the PSTypeName required by the parameter: IResultObject#SMS_ST_RecurInterval

$Site = Get-CMSite

$Sched = New-CMSchedule -Start "01/01/2015 04:00 AM" ` -DayOfWeek Sunday -RecurCount 1 # Enable and Configure Active Directory System Discovery Set-CMDiscoveryMethod -ActiveDirectorySystemDiscovery ` -SiteCode $Site.SiteCode ` -Enabled $True ` -PollingSchedule $Sched ` -EnableDeltaDiscovery $True ` -DeltaDiscoveryIntervalMinutes 5 ` -EnableFilteringExpiredLogon $True ` -TimeSinceLastLogonDays 90 ` -EnableFilteringExpiredPassword $true ` -TimeSinceLastPasswordUpdateDays 90





  • Edited by jsc.19 1 hour 3 minutes ago
July 27th, 2015 2:44am

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

Other recent topics Other recent topics