< Back

New-SmaAsset

Thu Jan 16, 2020 9:47 am

NAME New-SmaAsset



SYNOPSIS







SYNTAX

New-SmaAsset [-Body] <Hashtable> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

Creates a new SMA asset.





PARAMETERS

-Body <Hashtable>

A hashtable-formatted payload containing the asset information. See example.



Required? true

Position? 0

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



-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> $NewAgentAsset = @{

'Assets' =@(

@{

'name'='x2test'

"asset_type_id" = 5

'location_id' = 1

'asset_type_name' = "Computer with Dell Agent"

}

)

}



PS> New-SmaAsset -Body $NewAgentAsset



Creates a new SMA asset or type 'Computer with Dell Agent'.



RELATED LINKS

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