< Back

Set-SmaMachineInventory

Thu Jan 16, 2020 9:50 am

NAME Set-SmaMachineInventory



SYNOPSIS







SYNTAX

Set-SmaMachineInventory [-MachineID] <String> -Body <Hashtable> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

Updates the inventory information for a device.





PARAMETERS

-Body <Hashtable>

The payload of the update, in hashtable format.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-MachineID <String>

The machine whose information you want to update.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

PSCustomObject







NOTES









-------------------------- Example 1 --------------------------



PS> $Body = @{

'Machines' = @(

@{

'id' = 1234

'notes' = ((Get-Date).tostring())



}

)

}



PS> Set-SmaMachineInventory -MachineID 1234



Updates the notes field for machine ID 1234. Specified ID in body must match `-MachineID` parameter.



RELATED LINKS

Online Version: https://github.com/ArtisanByteCrafter/K ... ventory.md