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()
$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