Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to check the CCM Updates Schedule as seen in Configuration Manager Updates tab. I've been looking around on google and I've not been able to find a consistent answer to this.

I tried to create a COM object using UDA.CCMUpdatesDeployment. This allows me to successfully set the recurring schedule with SetUserDefinedSchedule method. If I try to use GetUserDefinedSchedule I only get the original values of the variables.

PS> $UD = New-Object -com "UDA.CCMUpdatesDeployment"
PS> $A= 101
PS> $B= 102
PS> $UD.GetUserDefinedSchedule([ref]$A, [ref]$B)
PS> $A
PS> $B
PS> $UD.GetUserDefinedSchedule

MemberType          : Method
OverloadDefinitions : {void GetUserDefinedSchedule (Variant, Variant)}
TypeNameOfValue     : System.Management.Automation.PSMethod
Value               : void GetUserDefinedSchedule (Variant, Variant)
Name                : GetUserDefinedSchedule
IsInstance          : True

I actually want to be able to do this remotely for a list of servers in a text file but right now any way would do.

share|improve this question

So I'm a complete newbie on Powershell.

My variables should have been declared:

PS> [ref]$A = $Null
PS> [ref]$B = $Null

Then the command should have been run as:

PS> $UD.GetUserDefinedSchedule($A,$B)

Result for every Sunday at 3 AM is:

PS> $A
PS> $B

First variable is an index of the various options available in the drop down box. Second variable contains the time in 24 hour format. So 3 PM will give value 15.

I got the answer while browsing through some powershell code. I was thinking of pass by reference as a C function to update the same variable. I still don't understand the concept in Powershell. If I update CCM and run the command using the same variables the value does not change.

share|improve this answer

Can you give this a go? Notice the way the parameters are passed in Powershell.

$A = $null
$B = $null
$UD.GetUserDefinedSchedule ([ref]$A) ([ref]$B)
write-host "Recurrence: $A"
write-host "Hour: $B"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.