diff --git a/SnipeitPS/Public/Remove-Asset.ps1 b/SnipeitPS/Public/Remove-Asset.ps1 new file mode 100644 index 0000000..deec338 --- /dev/null +++ b/SnipeitPS/Public/Remove-Asset.ps1 @@ -0,0 +1,48 @@ +<# + .SYNOPSIS + Removes Asset to Snipe-it asset system + .DESCRIPTION + Long description + .PARAMETER ID + Unique ID For Asset to be removed + .EXAMPLE + Remove-Asset -ID 44 -url $url -apiKey $secret -Verbose +#> + +function Remove-Asset () +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Low" + )] + + Param( + [parameter(mandatory = $true)] + [string]$ID, + [parameter(mandatory = $true)] + [string]$URL, + [parameter(mandatory = $true)] + [string]$APIKey + + ) + + $Values = @{ + "ID" = $Name + } + + $Body = $Values | ConvertTo-Json + + $Parameters = @{ + Uri = "$url/api/v1/hardware/$ID" + Method = 'Delete' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess("ShouldProcess?")) + { + $result = Invoke-SnipeitMethod @Parameters + } + + $result +} diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..3397c9a --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-architect \ No newline at end of file