Skip to content

How Do I Change Using PowerShell the Default Client Settings Hardware Inventory Schedule?

Featured Replies

I need a command line that can be run on a number of SCCM environments that changes the HW Inventory Schedule from 7 days to 1 day (Default Client Settings). This cannot be done manually (dont ask!).

 

Get-CMClientSetting -Setting HardwareInventory

Using the docs.microsoft.com pages below, I have established using Get-CMClientSetting that my current 7 day schedule the value is 000120000010038. After manually changing the schedule to 1 day, that value changes to 000120000010008


When I try to use Set-CMClientSetting it will not accept the value that is shown above.

My command line is the following, is it that which is wrong? Or should I interpret the value differently?

Set-CMClientSetting -Name "Default Client Settings" -HardwareInventorySettings -InventorySchedule 000120000010008

 

https://docs.microsoft.com/en-us/powershell/module/configurationmanager/get-cmclientsetting?view=sccm-ps

https://docs.microsoft.com/en-us/powershell/module/configurationmanager/set-cmclientsettinghardwareinventory?view=sccm-ps

 

Thanks for any help!!

Check out WMI trigger without client settings change:

https://rid500.wordpress.com/2017/07/23/sccm-refresh-machine-policy-retrieval-evaluation-cycle-via-wmi/

Or, create new custom client settings and deploy to a collection in which you put your targeted devices.

For a one time job, I remote to the machine using psexec \\hostname cmd.exe and then run:

WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000001}" /NOINTERACTIVE

  • Author

Thanks for responding, but i think you haven't fully read my post.

I require a script which can change the Default Client Settings. This is a script to run on the server, not on clients. I dont care about a specific device sending a HW scan. I need the policy to change the Default Client Settings so that all devices send inventory every day (not every 7) forever.

It is possible with powershell juding by the MS Docs, but i cannot get a command line working.

I need someone with better PowerShell skills that me...

  • Author

I have managed to work this out.

I realised that the value returned using Get-CMClientSettings was possibly an array. Hence why using Set-CMClientSettings does not accept an integer. I then re-read the MS Docs and found the function New-CMSchedule

Using that function, i first set a variable and then used that with the Set-CMClientSettings function, creating the following script that will set the HW interval to 1 day
 

$HWInvSched = New-CMSchedule -RecurCount 1 -RecurInterval Days
Set-CMClientSetting -Name "Default Client Agent Settings" -HardwareInventorySettings -InventorySchedule $HWInvSched

 

Hope this helps someone else!

  • 2 years later...

Do you have any custom script to add/modify Remote Tools in default client settings. I am looking and trying to create custom client settings with selected settings like Remote Tools, Hardware Inventory etc., Please help on this

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.