From 3f9b01f92f8924abd072ca7819e8479bdedc722b Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 28 Apr 2019 11:09:50 +0100 Subject: [PATCH 1/6] Set theme jekyll-theme-cayman --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml 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 From 2ec48c67a179c686c45cb7506bc1f146766c95d5 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 9 Oct 2019 08:56:46 +0100 Subject: [PATCH 2/6] Set theme jekyll-theme-architect --- docs/_config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_config.yml 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 From 7cbcd575f63365f26286de811b9c440b9c031ebd Mon Sep 17 00:00:00 2001 From: MrCarter <36346842+MrCarter2959@users.noreply.github.com> Date: Thu, 23 Jan 2020 11:08:42 -0500 Subject: [PATCH 3/6] Create Remove-Asset.ps1 --- SnipeitPS/Public/Remove-Asset.ps1 | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 SnipeitPS/Public/Remove-Asset.ps1 diff --git a/SnipeitPS/Public/Remove-Asset.ps1 b/SnipeitPS/Public/Remove-Asset.ps1 new file mode 100644 index 0000000..630ddfa --- /dev/null +++ b/SnipeitPS/Public/Remove-Asset.ps1 @@ -0,0 +1,49 @@ +<# + .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 +} From 621bab7d4e75ffee92a62ac82cedc11868132e76 Mon Sep 17 00:00:00 2001 From: MrCarter <36346842+MrCarter2959@users.noreply.github.com> Date: Thu, 23 Jan 2020 11:14:36 -0500 Subject: [PATCH 4/6] Update Remove-Asset.ps1 --- SnipeitPS/Public/Remove-Asset.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SnipeitPS/Public/Remove-Asset.ps1 b/SnipeitPS/Public/Remove-Asset.ps1 index 630ddfa..15b8e9e 100644 --- a/SnipeitPS/Public/Remove-Asset.ps1 +++ b/SnipeitPS/Public/Remove-Asset.ps1 @@ -5,7 +5,6 @@ Long description .PARAMETER ID Unique ID For Asset to be removed - .EXAMPLE Remove-Asset -ID 44 -url $url -apiKey $secret -Verbose #> @@ -31,7 +30,7 @@ function Remove-Asset () "ID" = $Name } - $Body = $Values | ConvertTo-Json; + $Body = $Values | ConvertTo-Json $Parameters = @{ Uri = "$url/api/v1/hardware/$ID" From 381ee730fdb92baba6d659dcda759b6b2c4b20ca Mon Sep 17 00:00:00 2001 From: MrCarter <36346842+MrCarter2959@users.noreply.github.com> Date: Thu, 23 Jan 2020 11:16:44 -0500 Subject: [PATCH 5/6] Update Remove-Asset.ps1 --- SnipeitPS/Public/Remove-Asset.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SnipeitPS/Public/Remove-Asset.ps1 b/SnipeitPS/Public/Remove-Asset.ps1 index 15b8e9e..69dddc2 100644 --- a/SnipeitPS/Public/Remove-Asset.ps1 +++ b/SnipeitPS/Public/Remove-Asset.ps1 @@ -29,7 +29,7 @@ function Remove-Asset () $Values = @{ "ID" = $Name } - + $Body = $Values | ConvertTo-Json $Parameters = @{ From e5c9a9db51b2eeff95d3120ab5bb6ac3adf5c9b4 Mon Sep 17 00:00:00 2001 From: MrCarter <36346842+MrCarter2959@users.noreply.github.com> Date: Thu, 23 Jan 2020 11:18:34 -0500 Subject: [PATCH 6/6] Update Remove-Asset.ps1 --- SnipeitPS/Public/Remove-Asset.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SnipeitPS/Public/Remove-Asset.ps1 b/SnipeitPS/Public/Remove-Asset.ps1 index 69dddc2..deec338 100644 --- a/SnipeitPS/Public/Remove-Asset.ps1 +++ b/SnipeitPS/Public/Remove-Asset.ps1 @@ -29,7 +29,7 @@ function Remove-Asset () $Values = @{ "ID" = $Name } - + $Body = $Values | ConvertTo-Json $Parameters = @{