Wednesday, July 31, 2019

Power-Shell script to delete the Hardware Inventory queue in client machine if it's stuck

If you see Inventoryagent.log says Hardware inventory already in queue and nothing running in inventory agent


$Computername = 'machinename'
$query = "SELECT * FROM InventoryActionStatus WHERE InventoryActionID='{00000000-0000-0000-0000-000000000001}'"
$hwint = Get-WmiObject -Query $query -ComputerName $Computername -Namespace "root\ccm\invagt"
$hwint.Delete()


No comments:

Post a Comment

SCCM Application Deployment Tool

SCCM Application Deployment Tool Streamlining SCCM Application Deployments: Introducing the SCCM Application Deployment Tool. In the realm o...