Microsoft

System Center Configuration Manager Feedback

Suggestion box powered by UserVoice

How can we improve Configuration Manager?

Set-CMClientSetting software inventory

Set-CMClientSetting for software inventory, add option to add/remove what files need to be inventoried

1 vote
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Raphael Perez shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

3 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
  • Ann Sumner commented  ·   ·  Flag as inappropriate

    I am also struggling to understand how to inventory *.exe using powershell, the article does not give any examples so my command complains:

    $ClientSettingsName = 'Unified Endpoint Management Settings'

    $CMSchedule7day = New-CMSchedule -Start '2018/01/01 00:00:00' -RecurInterval Days -RecurCount 7

    Set-CMClientSettingSoftwareInventory -Name $ClientSettingsName -Enable $True -ReportOption FullDetail -Schedule $CMSchedule7day -AddInventoryFileType '*.exe'

    The output error I am getting is as follows:

    Set-CMClientSettingSoftwareInventory : Cannot bind parameter 'AddInventoryFileType'. Cannot convert the "*.exe" value of type "System.String" to type "System.Collections.Hashtable".
    At line:3 char:151
    + ... on FullDetail -Schedule $CMSchedule7day -AddInventoryFileType '*.exe'
    + ~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Set-CMClientSettingSoftwareInventory], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.ConfigurationManagement.Cmdlets.ClientSettings.Commands.SetClientSettingSoftwareInventoryCommand

  • AndyD commented  ·   ·  Flag as inappropriate

    Bit delayed but can the online articles and help give some better examples? Im struggling to understand how to inventory *.exe using powershell

Feedback and Knowledge Base