Today I tried to modify Hardware Inventory Schedule client setting and it didn’t work. First I thought that I did something wrong or the cmdlet is broken. Here is the cmdlet Verbose output
Then I thought that, lets disable the HW client setting and then enable the HW client setting with correct schedule and Bingo it worked correctly.
$ClientSettingsName = 'HW Settings'
Set-CMClientSetting -Name $ClientSettingsName -EnableHardwareInventory $false -Verbose -Debug
$CMWeeklySchedule = New-CMSchedule -RecurCount 1 -RecurInterval Hours
Set-CMClientSetting -InventorySchedule $CMWeeklySchedule -Name $ClientSettingsName -EnableHardwareInventory $True -Verbose -Debug
If you compare the verbose outputs, then you will see the difference – first time it didn’t query the SMS_SCI_ClientComp WMI instance but second time it did.
Now If I try to modify the schedule again I don’t need to disable the HW setting. I tested this on Configuration Manager 2012 R2 CU1 lab.