From 5c17660cca532f58da645a8fd554d8af69588a54 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sat, 22 May 2021 09:00:40 +0300 Subject: [PATCH 01/17] get by id --- SnipeitPS/Public/Get-CustomField.ps1 | 15 +++++++++++++-- SnipeitPS/Public/Get-Fieldset.ps1 | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/SnipeitPS/Public/Get-CustomField.ps1 b/SnipeitPS/Public/Get-CustomField.ps1 index ff52aa5..6d27ed3 100644 --- a/SnipeitPS/Public/Get-CustomField.ps1 +++ b/SnipeitPS/Public/Get-CustomField.ps1 @@ -1,6 +1,9 @@ <# .SYNOPSIS - Returns a list of all Snipe-IT custom fields + Returns specific Snipe-IT custom field or a list of all custom field + + .PARAMETER id + A id of specific field .PARAMETER url URL of Snipeit system, can be set using Set-Info command @@ -16,6 +19,8 @@ function Get-CustomField() { Param( + [int]$id, + [parameter(mandatory = $true)] [string]$url, @@ -23,8 +28,14 @@ function Get-CustomField() [string]$apiKey ) + if ($id) { + $apiurl= "$url/api/v1/fields/$id" + } else { + $apiurl = "$url/api/v1/fields" + } + $Parameters = @{ - Uri = "$url/api/v1/fields" + Uri = $apiurl Method = 'Get' Token = $apiKey } diff --git a/SnipeitPS/Public/Get-Fieldset.ps1 b/SnipeitPS/Public/Get-Fieldset.ps1 index 54035b3..c068330 100644 --- a/SnipeitPS/Public/Get-Fieldset.ps1 +++ b/SnipeitPS/Public/Get-Fieldset.ps1 @@ -1,6 +1,9 @@ <# .SYNOPSIS -Gets a list of Snipe-it Fieldsets +Returns a fieldset or list of Snipe-it Fieldsets + +.PARAMETER id +A id of specific fieldset .PARAMETER url URL of Snipeit system, can be set using Set-Info command @@ -18,6 +21,8 @@ Get-Fieldset -url "https://assets.example.com" -token "token..." | Where-Object function Get-Fieldset() { Param( + [int]$id, + [parameter(mandatory = $true)] [string]$url, @@ -25,8 +30,14 @@ function Get-Fieldset() { [string]$apiKey ) + if ($id) { + $apiurl = "$url/api/v1/fieldsets/$id" + } else { + $apiurl = "$url/api/v1/fieldsets" + } + $Parameters = @{ - Uri = "$url/api/v1/fieldsets" + Uri = $apiurl Method = 'Get' Token = $apiKey } From d4e2360d725c165d6e0768a1539636e974919592 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sat, 22 May 2021 18:44:36 +0300 Subject: [PATCH 02/17] Prefixed all commands and added aliases --- ...Accessory.ps1 => Get-SnipeItAccessory.ps1} | 8 +- .../{Get-Asset.ps1 => Get-SnipeItAsset.ps1} | 10 +- ...ce.ps1 => Get-SnipeItAssetMaintenance.ps1} | 8 +- ...t-Category.ps1 => Get-SnipeItCategory.ps1} | 10 +- ...Get-Company.ps1 => Get-SnipeItCompany.ps1} | 10 +- ...Component.ps1 => Get-SnipeItComponent.ps1} | 10 +- ...omField.ps1 => Get-SnipeItCustomField.ps1} | 6 +- ...partment.ps1 => Get-SnipeItDepartment.ps1} | 10 +- ...t-Fieldset.ps1 => Get-SnipeItFieldset.ps1} | 6 +- ...Get-License.ps1 => Get-SnipeItLicense.ps1} | 10 +- ...itLocation.ps1 => Get-SnipeItLocation.ps1} | 6 +- ...cturer.ps1 => Get-SnipeItManufacturer.ps1} | 10 +- .../{Get-Model.ps1 => Get-SnipeItModel.ps1} | 8 +- .../{Get-Status.ps1 => Get-SnipeItStatus.ps1} | 10 +- ...t-Supplier.ps1 => Get-SnipeItSupplier.ps1} | 10 +- .../{Get-User.ps1 => Get-SnipeItUser.ps1} | 8 +- ...Accessory.ps1 => New-SnipeItAccessory.ps1} | 6 +- .../{New-Asset.ps1 => New-SnipeItAsset.ps1} | 6 +- ...ce.ps1 => New-SnipeItAssetMaintenance.ps1} | 6 +- .../{New-Audit.ps1 => New-SnipeItAudit.ps1} | 2 +- ...w-Category.ps1 => New-SnipeItCategory.ps1} | 6 +- ...New-Company.ps1 => New-SnipeItCompany.ps1} | 6 +- ...Component.ps1 => New-SnipeItComponent.ps1} | 6 +- ...omField.ps1 => New-SnipeItCustomField.ps1} | 6 +- ...partment.ps1 => New-SnipeItDepartment.ps1} | 6 +- ...New-License.ps1 => New-SnipeItLicense.ps1} | 6 +- ...w-Location.ps1 => New-SnipeItLocation.ps1} | 6 +- ...cturer.ps1 => New-SnipeItManufacturer.ps1} | 6 +- .../{New-Model.ps1 => New-SnipeItModel.ps1} | 6 +- .../{New-User.ps1 => New-SnipeItUser.ps1} | 6 +- ...move-Asset.ps1 => Remove-SnipeItAsset.ps1} | 12 +- ...ps1 => Remove-SnipeItAssetMaintenance.ps1} | 8 +- ...Remove-User.ps1 => Remove-SnipeItUser.ps1} | 6 +- ...tOwner.ps1 => Reset-SnipeItAssetOwner.ps1} | 6 +- ...Accessory.ps1 => Set-SnipeItAccessory.ps1} | 6 +- .../{Set-Asset.ps1 => Set-SnipeItAsset.ps1} | 6 +- ...setOwner.ps1 => Set-SnipeItAssetOwner.ps1} | 6 +- ...mponents.ps1 => Set-SnipeItComponents.ps1} | 6 +- .../{Set-Info.ps1 => Set-SnipeItInfo.ps1} | 8 +- ...Set-License.ps1 => Set-SnipeItLicense.ps1} | 6 +- ...itLocation.ps1 => Set-SnipeItLocation.ps1} | 4 +- .../{Set-Model.ps1 => Set-SnipeItModel.ps1} | 6 +- .../{Set-User.ps1 => Set-SnipeItUser.ps1} | 6 +- SnipeitPS/SnipeItPS.psd1 | Bin 9808 -> 11972 bytes SnipeitPS/SnipeItPS.psm1 | 42 +++ ...t-Accessory.md => Get-SnipeItAccessory.md} | 6 +- docs/{Get-Asset.md => Get-SnipeItAsset.md} | 10 +- ...ance.md => Get-SnipeItAssetMaintenance.md} | 6 +- ...Get-Category.md => Get-SnipeItCategory.md} | 12 +- .../{Get-Company.md => Get-SnipeItCompany.md} | 12 +- ...t-Component.md => Get-SnipeItComponent.md} | 10 +- ...stomField.md => Get-SnipeItCustomField.md} | 27 +- ...Department.md => Get-SnipeItDepartment.md} | 12 +- ...Get-Fieldset.md => Get-SnipeItFieldset.md} | 27 +- ...facturer.md => Get-SnipeItManufacturer.md} | 8 +- docs/{Get-Model.md => Get-SnipeItModel.md} | 8 +- docs/{Get-Status.md => Get-SnipeItStatus.md} | 12 +- ...Get-Supplier.md => Get-SnipeItSupplier.md} | 10 +- docs/{Get-User.md => Get-SnipeItUser.md} | 4 +- docs/Get-SnipeitLocation.md | 168 ------------ docs/{New-Asset.md => New-SnipeItAsset.md} | 6 +- ...ance.md => New-SnipeItAssetMaintenance.md} | 6 +- ...New-Category.md => New-SnipeItCategory.md} | 8 +- ...w-Component.md => New-SnipeItComponent.md} | 6 +- ...stomField.md => New-SnipeItCustomField.md} | 6 +- ...Department.md => New-SnipeItDepartment.md} | 6 +- .../{New-License.md => New-SnipeItLicense.md} | 6 +- ...New-Location.md => New-SnipeItLocation.md} | 6 +- ...facturer.md => New-SnipeItManufacturer.md} | 7 +- docs/{New-Model.md => New-SnipeItModel.md} | 6 +- docs/{New-User.md => New-SnipeItUser.md} | 10 +- ...Remove-Asset.md => Remove-SnipeItAsset.md} | 10 +- .../{Remove-User.md => Remove-SnipeItUser.md} | 6 +- ...t-Accessory.md => Set-SnipeItAccessory.md} | 6 +- docs/{Set-Asset.md => Set-SnipeItAsset.md} | 6 +- ...AssetOwner.md => Set-SnipeItAssetOwner.md} | 6 +- ...t-Component.md => Set-SnipeItComponent.md} | 6 +- docs/{Set-Info.md => Set-SnipeItInfo.md} | 6 +- .../{Set-License.md => Set-SnipeItLicense.md} | 6 +- docs/{Set-Model.md => Set-SnipeItModel.md} | 6 +- docs/{Set-User.md => Set-SnipeItUser.md} | 6 +- docs/Set-SnipeitLocation.md | 253 ------------------ docs/SnipeItPS.md | 82 +++--- 83 files changed, 399 insertions(+), 753 deletions(-) rename SnipeitPS/Public/{Get-Accessory.ps1 => Get-SnipeItAccessory.ps1} (89%) rename SnipeitPS/Public/{Get-Asset.ps1 => Get-SnipeItAsset.ps1} (94%) rename SnipeitPS/Public/{Get-AssetMaintenance.ps1 => Get-SnipeItAssetMaintenance.ps1} (89%) rename SnipeitPS/Public/{Get-Category.ps1 => Get-SnipeItCategory.ps1} (88%) rename SnipeitPS/Public/{Get-Company.ps1 => Get-SnipeItCompany.ps1} (88%) rename SnipeitPS/Public/{Get-Component.ps1 => Get-SnipeItComponent.ps1} (90%) rename SnipeitPS/Public/{Get-CustomField.ps1 => Get-SnipeItCustomField.ps1} (80%) rename SnipeitPS/Public/{Get-Department.ps1 => Get-SnipeItDepartment.ps1} (89%) rename SnipeitPS/Public/{Get-Fieldset.ps1 => Get-SnipeItFieldset.ps1} (82%) rename SnipeitPS/Public/{Get-License.ps1 => Get-SnipeItLicense.ps1} (91%) rename SnipeitPS/Public/{Get-SnipeitLocation.ps1 => Get-SnipeItLocation.ps1} (92%) rename SnipeitPS/Public/{Get-Manufacturer.ps1 => Get-SnipeItManufacturer.ps1} (88%) rename SnipeitPS/Public/{Get-Model.ps1 => Get-SnipeItModel.ps1} (89%) rename SnipeitPS/Public/{Get-Status.ps1 => Get-SnipeItStatus.ps1} (88%) rename SnipeitPS/Public/{Get-Supplier.ps1 => Get-SnipeItSupplier.ps1} (88%) rename SnipeitPS/Public/{Get-User.ps1 => Get-SnipeItUser.ps1} (91%) rename SnipeitPS/Public/{New-Accessory.ps1 => New-SnipeItAccessory.ps1} (93%) rename SnipeitPS/Public/{New-Asset.ps1 => New-SnipeItAsset.ps1} (95%) rename SnipeitPS/Public/{New-AssetMaintenance.ps1 => New-SnipeItAssetMaintenance.ps1} (92%) rename SnipeitPS/Public/{New-Audit.ps1 => New-SnipeItAudit.ps1} (92%) rename SnipeitPS/Public/{New-Category.ps1 => New-SnipeItCategory.ps1} (91%) rename SnipeitPS/Public/{New-Company.ps1 => New-SnipeItCompany.ps1} (84%) rename SnipeitPS/Public/{New-Component.ps1 => New-SnipeItComponent.ps1} (90%) rename SnipeitPS/Public/{New-CustomField.ps1 => New-SnipeItCustomField.ps1} (87%) rename SnipeitPS/Public/{New-Department.ps1 => New-SnipeItDepartment.ps1} (87%) rename SnipeitPS/Public/{New-License.ps1 => New-SnipeItLicense.ps1} (94%) rename SnipeitPS/Public/{New-Location.ps1 => New-SnipeItLocation.ps1} (90%) rename SnipeitPS/Public/{New-Manufacturer.ps1 => New-SnipeItManufacturer.ps1} (84%) rename SnipeitPS/Public/{New-Model.ps1 => New-SnipeItModel.ps1} (91%) rename SnipeitPS/Public/{New-User.ps1 => New-SnipeItUser.ps1} (93%) rename SnipeitPS/Public/{Remove-Asset.ps1 => Remove-SnipeItAsset.ps1} (74%) rename SnipeitPS/Public/{Remove-AssetMaintenance.ps1 => Remove-SnipeItAssetMaintenance.ps1} (81%) rename SnipeitPS/Public/{Remove-User.ps1 => Remove-SnipeItUser.ps1} (84%) rename SnipeitPS/Public/{Reset-AssetOwner.ps1 => Reset-SnipeItAssetOwner.ps1} (87%) rename SnipeitPS/Public/{Set-Accessory.ps1 => Set-SnipeItAccessory.ps1} (92%) rename SnipeitPS/Public/{Set-Asset.ps1 => Set-SnipeItAsset.ps1} (94%) rename SnipeitPS/Public/{Set-AssetOwner.ps1 => Set-SnipeItAssetOwner.ps1} (93%) rename SnipeitPS/Public/{Set-Components.ps1 => Set-SnipeItComponents.ps1} (90%) rename SnipeitPS/Public/{Set-Info.ps1 => Set-SnipeItInfo.ps1} (89%) rename SnipeitPS/Public/{Set-License.ps1 => Set-SnipeItLicense.ps1} (94%) rename SnipeitPS/Public/{Set-SnipeitLocation.ps1 => Set-SnipeItLocation.ps1} (92%) rename SnipeitPS/Public/{Set-Model.ps1 => Set-SnipeItModel.ps1} (90%) rename SnipeitPS/Public/{Set-User.ps1 => Set-SnipeItUser.ps1} (92%) rename docs/{Get-Accessory.md => Get-SnipeItAccessory.md} (96%) rename docs/{Get-Asset.md => Get-SnipeItAsset.md} (97%) rename docs/{Get-AssetMaintenance.md => Get-SnipeItAssetMaintenance.md} (95%) rename docs/{Get-Category.md => Get-SnipeItCategory.md} (91%) rename docs/{Get-Company.md => Get-SnipeItCompany.md} (91%) rename docs/{Get-Component.md => Get-SnipeItComponent.md} (95%) rename docs/{Get-CustomField.md => Get-SnipeItCustomField.md} (74%) rename docs/{Get-Department.md => Get-SnipeItDepartment.md} (91%) rename docs/{Get-Fieldset.md => Get-SnipeItFieldset.md} (77%) rename docs/{Get-Manufacturer.md => Get-SnipeItManufacturer.md} (94%) rename docs/{Get-Model.md => Get-SnipeItModel.md} (92%) rename docs/{Get-Status.md => Get-SnipeItStatus.md} (91%) rename docs/{Get-Supplier.md => Get-SnipeItSupplier.md} (91%) rename docs/{Get-User.md => Get-SnipeItUser.md} (97%) delete mode 100644 docs/Get-SnipeitLocation.md rename docs/{New-Asset.md => New-SnipeItAsset.md} (97%) rename docs/{New-AssetMaintenance.md => New-SnipeItAssetMaintenance.md} (96%) rename docs/{New-Category.md => New-SnipeItCategory.md} (92%) rename docs/{New-Component.md => New-SnipeItComponent.md} (96%) rename docs/{New-CustomField.md => New-SnipeItCustomField.md} (95%) rename docs/{New-Department.md => New-SnipeItDepartment.md} (95%) rename docs/{New-License.md => New-SnipeItLicense.md} (97%) rename docs/{New-Location.md => New-SnipeItLocation.md} (96%) rename docs/{New-Manufacturer.md => New-SnipeItManufacturer.md} (92%) rename docs/{New-Model.md => New-SnipeItModel.md} (95%) rename docs/{New-User.md => New-SnipeItUser.md} (96%) rename docs/{Remove-Asset.md => Remove-SnipeItAsset.md} (91%) rename docs/{Remove-User.md => Remove-SnipeItUser.md} (93%) rename docs/{Set-Accessory.md => Set-SnipeItAccessory.md} (97%) rename docs/{Set-Asset.md => Set-SnipeItAsset.md} (98%) rename docs/{Set-AssetOwner.md => Set-SnipeItAssetOwner.md} (96%) rename docs/{Set-Component.md => Set-SnipeItComponent.md} (96%) rename docs/{Set-Info.md => Set-SnipeItInfo.md} (92%) rename docs/{Set-License.md => Set-SnipeItLicense.md} (97%) rename docs/{Set-Model.md => Set-SnipeItModel.md} (96%) rename docs/{Set-User.md => Set-SnipeItUser.md} (97%) delete mode 100644 docs/Set-SnipeitLocation.md diff --git a/SnipeitPS/Public/Get-Accessory.ps1 b/SnipeitPS/Public/Get-SnipeItAccessory.ps1 similarity index 89% rename from SnipeitPS/Public/Get-Accessory.ps1 rename to SnipeitPS/Public/Get-SnipeItAccessory.ps1 index 3cb0ba6..6002214 100644 --- a/SnipeitPS/Public/Get-Accessory.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAccessory.ps1 @@ -21,10 +21,10 @@ Result offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Accessory -search Keyboard @@ -34,7 +34,7 @@ Get-Accessory -id 1 #> -function Get-Accessory() { +function Get-SnipeItAccessory() { Param( [string]$search, @@ -81,7 +81,7 @@ function Get-Accessory() { while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Accessory @callargs + $res=Get-SnipeItAccessory @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Asset.ps1 b/SnipeitPS/Public/Get-SnipeItAsset.ps1 similarity index 94% rename from SnipeitPS/Public/Get-Asset.ps1 rename to SnipeitPS/Public/Get-SnipeItAsset.ps1 index 8954437..c60e265 100644 --- a/SnipeitPS/Public/Get-Asset.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAsset.ps1 @@ -54,10 +54,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Asset -url "https://assets.example.com"-token "token..." @@ -72,11 +72,11 @@ Get-Asset -search "myMachine"-url "https://assets.example.com"-token "token..." Get-Asset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..." #> -function Get-Asset() { +function Get-SnipeItAsset() { Param( [string]$search, - [string]$id, + [int]$id, [string]$asset_tag, @@ -164,7 +164,7 @@ function Get-Asset() { while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Asset @callargs + $res=Get-SnipeItAsset @callargs $res if ( $res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-AssetMaintenance.ps1 b/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 similarity index 89% rename from SnipeitPS/Public/Get-AssetMaintenance.ps1 rename to SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 index 81b29fe..1a5aa4b 100644 --- a/SnipeitPS/Public/Get-AssetMaintenance.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 @@ -24,10 +24,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-AssetMaintenances -url "https://assets.example.com" -token "token..." @@ -38,7 +38,7 @@ Get-AssetMaintenances -search "myMachine" -url "https://assets.example.com" -tok .EXAMPLE Get-AssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." #> -function Get-AssetMaintenance() { +function Get-SnipeItAssetMaintenance() { Param( [string]$search, @@ -79,7 +79,7 @@ function Get-AssetMaintenance() { while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-AssetMaintenance @callargs + $res=Get-SnipeItAssetMaintenance @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Category.ps1 b/SnipeitPS/Public/Get-SnipeItCategory.ps1 similarity index 88% rename from SnipeitPS/Public/Get-Category.ps1 rename to SnipeitPS/Public/Get-SnipeItCategory.ps1 index c66f530..d1fdce0 100644 --- a/SnipeitPS/Public/Get-Category.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCategory.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -Url of Snipeit system, can be set using Set-Info command +Url of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Category -id 1 @@ -31,12 +31,12 @@ Get-Category -search "Laptop" #> -function Get-Category() +function Get-SnipeItCategory() { Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", @@ -81,7 +81,7 @@ function Get-Category() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Category @callargs + $res=Get-SnipeItCategory @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Company.ps1 b/SnipeitPS/Public/Get-SnipeItCompany.ps1 similarity index 88% rename from SnipeitPS/Public/Get-Company.ps1 rename to SnipeitPS/Public/Get-SnipeItCompany.ps1 index fbead48..7e9be6c 100644 --- a/SnipeitPS/Public/Get-Company.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCompany.ps1 @@ -17,10 +17,10 @@ Offset to use .PARAMETER all A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Company @@ -32,12 +32,12 @@ Gets specific company #> -function Get-Company() +function Get-SnipeItCompany() { Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", @@ -82,7 +82,7 @@ function Get-Company() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Company @callargs + $res=Get-SnipeItCompany @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Component.ps1 b/SnipeitPS/Public/Get-SnipeItComponent.ps1 similarity index 90% rename from SnipeitPS/Public/Get-Component.ps1 rename to SnipeitPS/Public/Get-SnipeItComponent.ps1 index 2218ad5..3197c94 100644 --- a/SnipeitPS/Public/Get-Component.ps1 +++ b/SnipeitPS/Public/Get-SnipeItComponent.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system,can be set using Set-Info command +URL of Snipeit system,can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Component @@ -37,11 +37,11 @@ Returns specific component #> -function Get-Component() { +function Get-SnipeItComponent() { Param( [string]$search, - [string]$id, + [int]$id, [int]$category_id, @@ -95,7 +95,7 @@ function Get-Component() { while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Component @callargs + $res=Get-SnipeItComponent @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-CustomField.ps1 b/SnipeitPS/Public/Get-SnipeItCustomField.ps1 similarity index 80% rename from SnipeitPS/Public/Get-CustomField.ps1 rename to SnipeitPS/Public/Get-SnipeItCustomField.ps1 index 6d27ed3..736eed6 100644 --- a/SnipeitPS/Public/Get-CustomField.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCustomField.ps1 @@ -6,17 +6,17 @@ A id of specific field .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Field -url "https://assets.example.com" -token "token..." #> -function Get-CustomField() +function Get-SnipeItCustomField() { Param( [int]$id, diff --git a/SnipeitPS/Public/Get-Department.ps1 b/SnipeitPS/Public/Get-SnipeItDepartment.ps1 similarity index 89% rename from SnipeitPS/Public/Get-Department.ps1 rename to SnipeitPS/Public/Get-SnipeItDepartment.ps1 index 4fcaeb6..658940e 100644 --- a/SnipeitPS/Public/Get-Department.ps1 +++ b/SnipeitPS/Public/Get-SnipeItDepartment.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Department -url "https://assets.example.com" -token "token..." @@ -34,12 +34,12 @@ Get-Department -id 1 #> -function Get-Department() +function Get-SnipeItDepartment() { Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", @@ -87,7 +87,7 @@ function Get-Department() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Department @callargs + $res=Get-SnipeItDepartment @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Fieldset.ps1 b/SnipeitPS/Public/Get-SnipeItFieldset.ps1 similarity index 82% rename from SnipeitPS/Public/Get-Fieldset.ps1 rename to SnipeitPS/Public/Get-SnipeItFieldset.ps1 index c068330..429d45f 100644 --- a/SnipeitPS/Public/Get-Fieldset.ps1 +++ b/SnipeitPS/Public/Get-SnipeItFieldset.ps1 @@ -6,10 +6,10 @@ Returns a fieldset or list of Snipe-it Fieldsets A id of specific fieldset .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Fieldset -url "https://assets.example.com" -token "token..." @@ -19,7 +19,7 @@ Get-Fieldset -url "https://assets.example.com" -token "token..." | Where-Object #> -function Get-Fieldset() { +function Get-SnipeItFieldset() { Param( [int]$id, diff --git a/SnipeitPS/Public/Get-License.ps1 b/SnipeitPS/Public/Get-SnipeItLicense.ps1 similarity index 91% rename from SnipeitPS/Public/Get-License.ps1 rename to SnipeitPS/Public/Get-SnipeItLicense.ps1 index 0cb1a7d..dd1cbee 100644 --- a/SnipeitPS/Public/Get-License.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLicense.ps1 @@ -19,10 +19,10 @@ A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-License -search SomeLicense @@ -32,11 +32,11 @@ Get-License -id 1 #> -function Get-License() { +function Get-SnipeItLicense() { Param( [string]$search, - [string]$id, + [int]$id, [string]$name, @@ -106,7 +106,7 @@ function Get-License() { while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-License @callargs + $res=Get-SnipeItLicense @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-SnipeitLocation.ps1 b/SnipeitPS/Public/Get-SnipeItLocation.ps1 similarity index 92% rename from SnipeitPS/Public/Get-SnipeitLocation.ps1 rename to SnipeitPS/Public/Get-SnipeItLocation.ps1 index db9276e..da44f9d 100644 --- a/SnipeitPS/Public/Get-SnipeitLocation.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLocation.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Location -search Location1 @@ -36,7 +36,7 @@ function Get-SnipeitLocation() Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", diff --git a/SnipeitPS/Public/Get-Manufacturer.ps1 b/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 similarity index 88% rename from SnipeitPS/Public/Get-Manufacturer.ps1 rename to SnipeitPS/Public/Get-SnipeItManufacturer.ps1 index 9ddc1f1..62127ab 100644 --- a/SnipeitPS/Public/Get-Manufacturer.ps1 +++ b/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Manufacturer -search HP @@ -33,12 +33,12 @@ Returns manufacturer with id 3 #> -function Get-Manufacturer() +function Get-SnipeItManufacturer() { Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", @@ -83,7 +83,7 @@ function Get-Manufacturer() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Manufacturer @callargs + $res=Get-SnipeItManufacturer @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Model.ps1 b/SnipeitPS/Public/Get-SnipeItModel.ps1 similarity index 89% rename from SnipeitPS/Public/Get-Model.ps1 rename to SnipeitPS/Public/Get-SnipeItModel.ps1 index 0df4b34..7137778 100644 --- a/SnipeitPS/Public/Get-Model.ps1 +++ b/SnipeitPS/Public/Get-SnipeItModel.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Model -search "DL380" @@ -31,7 +31,7 @@ Get-Model -id 1 #> -function Get-Model() +function Get-SnipeItModel() { Param( [string]$search, @@ -81,7 +81,7 @@ function Get-Model() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Model @callargs + $res=Get-SnipeItModel @callargs $res if ($res.count -ne $limit ) { break diff --git a/SnipeitPS/Public/Get-Status.ps1 b/SnipeitPS/Public/Get-SnipeItStatus.ps1 similarity index 88% rename from SnipeitPS/Public/Get-Status.ps1 rename to SnipeitPS/Public/Get-SnipeItStatus.ps1 index 63fb4ca..05027e0 100644 --- a/SnipeitPS/Public/Get-Status.ps1 +++ b/SnipeitPS/Public/Get-SnipeItStatus.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Status -search "Ready to Deploy" @@ -31,12 +31,12 @@ Get-Status -id 3 #> -function Get-Status() +function Get-SnipeItStatus() { Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", @@ -81,7 +81,7 @@ function Get-Status() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Status @callargs + $res=Get-SnipeItStatus @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-Supplier.ps1 b/SnipeitPS/Public/Get-SnipeItSupplier.ps1 similarity index 88% rename from SnipeitPS/Public/Get-Supplier.ps1 rename to SnipeitPS/Public/Get-SnipeItSupplier.ps1 index 5cf5245..0f96342 100644 --- a/SnipeitPS/Public/Get-Supplier.ps1 +++ b/SnipeitPS/Public/Get-SnipeItSupplier.ps1 @@ -18,10 +18,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-Supplier -search MySupplier @@ -31,12 +31,12 @@ Get-Supplier -id 2 #> -function Get-Supplier() +function Get-SnipeItSupplier() { Param( [string]$search, - [string]$id, + [int]$id, [ValidateSet("asc", "desc")] [string]$order = "desc", @@ -81,7 +81,7 @@ function Get-Supplier() while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-Supplier @callargs + $res=Get-SnipeItSupplier @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/Get-User.ps1 b/SnipeitPS/Public/Get-SnipeItUser.ps1 similarity index 91% rename from SnipeitPS/Public/Get-User.ps1 rename to SnipeitPS/Public/Get-SnipeItUser.ps1 index 859c48a..6b1aec3 100644 --- a/SnipeitPS/Public/Get-User.ps1 +++ b/SnipeitPS/Public/Get-SnipeItUser.ps1 @@ -24,10 +24,10 @@ Offset to use A return all results, works with -offset and other parameters .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Get-User -search SomeSurname @@ -42,7 +42,7 @@ Get-User -username someuser Get-User -email user@somedomain.com #> -function Get-User() { +function Get-SnipeItUser() { Param( [string]$search, @@ -102,7 +102,7 @@ function Get-User() { while ($true) { $callargs['offset'] = $offstart $callargs['limit'] = $limit - $res=Get-User @callargs + $res=Get-SnipeItUser @callargs $res if ($res.count -lt $limit) { break diff --git a/SnipeitPS/Public/New-Accessory.ps1 b/SnipeitPS/Public/New-SnipeItAccessory.ps1 similarity index 93% rename from SnipeitPS/Public/New-Accessory.ps1 rename to SnipeitPS/Public/New-SnipeItAccessory.ps1 index 22fdd96..5d4cbbb 100644 --- a/SnipeitPS/Public/New-Accessory.ps1 +++ b/SnipeitPS/Public/New-SnipeItAccessory.ps1 @@ -48,16 +48,16 @@ ID number of the location the accessory is assigned to Min quantity of the accessory before alert is triggered .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Accessory -name "Accessory" -qty 3 -category_id 1 #> -function New-Accessory() { +function New-SnipeItAccessory() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/New-Asset.ps1 b/SnipeitPS/Public/New-SnipeItAsset.ps1 similarity index 95% rename from SnipeitPS/Public/New-Asset.ps1 rename to SnipeitPS/Public/New-SnipeItAsset.ps1 index d86a32f..654c510 100644 --- a/SnipeitPS/Public/New-Asset.ps1 +++ b/SnipeitPS/Public/New-SnipeItAsset.ps1 @@ -43,10 +43,10 @@ Optional Purchase cost of the Asset Optional Default location id for the asset .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .PARAMETER customfields Hastable of custom fields and extra fields that need passing through to Snipeit. @@ -65,7 +65,7 @@ New-Asset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit Using customfields when creating asset. #> -function New-Asset() +function New-SnipeItAsset() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-AssetMaintenance.ps1 b/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 similarity index 92% rename from SnipeitPS/Public/New-AssetMaintenance.ps1 rename to SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 index 8c66445..c86f200 100644 --- a/SnipeitPS/Public/New-AssetMaintenance.ps1 +++ b/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 @@ -31,15 +31,15 @@ Optional completion date Optional cost .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-AssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01 #> -function New-AssetMaintenance() { +function New-SnipeItAssetMaintenance() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/New-Audit.ps1 b/SnipeitPS/Public/New-SnipeItAudit.ps1 similarity index 92% rename from SnipeitPS/Public/New-Audit.ps1 rename to SnipeitPS/Public/New-SnipeItAudit.ps1 index 94824d3..d3bea0f 100644 --- a/SnipeitPS/Public/New-Audit.ps1 +++ b/SnipeitPS/Public/New-SnipeItAudit.ps1 @@ -16,7 +16,7 @@ New-Audit -tag 1 -location_id 1 #> -function New-Audit() +function New-SnipeItAudit() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-Category.ps1 b/SnipeitPS/Public/New-SnipeItCategory.ps1 similarity index 91% rename from SnipeitPS/Public/New-Category.ps1 rename to SnipeitPS/Public/New-SnipeItCategory.ps1 index f5e8c27..c2e51e4 100644 --- a/SnipeitPS/Public/New-Category.ps1 +++ b/SnipeitPS/Public/New-SnipeItCategory.ps1 @@ -9,10 +9,10 @@ Name of new category to be created Type of new category to be created (asset, accessory, consumable, component, license) .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -User's API Key for Snipeit, can be set using Set-Info command +User's API Key for Snipeit, can be set using Set-SnipeItInfo command .PARAMETER use_default_eula If switch is present, use the primary default EULA @@ -27,7 +27,7 @@ If switch is present, send email to user on checkin/checkout New-Category -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..." #> -function New-Category() +function New-SnipeItCategory() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-Company.ps1 b/SnipeitPS/Public/New-SnipeItCompany.ps1 similarity index 84% rename from SnipeitPS/Public/New-Company.ps1 rename to SnipeitPS/Public/New-SnipeItCompany.ps1 index 3d0b669..1b80e03 100644 --- a/SnipeitPS/Public/New-Company.ps1 +++ b/SnipeitPS/Public/New-SnipeItCompany.ps1 @@ -9,17 +9,17 @@ Creates new company on Snipe-It system Comapany name .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -User's API Key for Snipeit, can be set using Set-Info command +User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Company -name "Acme Company" #> -function New-Company() +function New-SnipeItCompany() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-Component.ps1 b/SnipeitPS/Public/New-SnipeItComponent.ps1 similarity index 90% rename from SnipeitPS/Public/New-Component.ps1 rename to SnipeitPS/Public/New-SnipeItComponent.ps1 index 4504de6..1ea0dbd 100644 --- a/SnipeitPS/Public/New-Component.ps1 +++ b/SnipeitPS/Public/New-SnipeItComponent.ps1 @@ -24,10 +24,10 @@ Date accessory was purchased Cost of item being purchased. .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -User's API Key for Snipeit, can be set using Set-Info command +User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE An example @@ -36,7 +36,7 @@ An example General notes #> -function New-Component() { +function New-SnipeItComponent() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/New-CustomField.ps1 b/SnipeitPS/Public/New-SnipeItCustomField.ps1 similarity index 87% rename from SnipeitPS/Public/New-CustomField.ps1 rename to SnipeitPS/Public/New-SnipeItCustomField.ps1 index 13557ad..1fba1cc 100644 --- a/SnipeitPS/Public/New-CustomField.ps1 +++ b/SnipeitPS/Public/New-SnipeItCustomField.ps1 @@ -9,16 +9,16 @@ Name of the Custom Field .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Field -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset" #> -function New-CustomField() +function New-SnipeItCustomField() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-Department.ps1 b/SnipeitPS/Public/New-SnipeItDepartment.ps1 similarity index 87% rename from SnipeitPS/Public/New-Department.ps1 rename to SnipeitPS/Public/New-SnipeItDepartment.ps1 index 800b3d8..ac5ce33 100644 --- a/SnipeitPS/Public/New-Department.ps1 +++ b/SnipeitPS/Public/New-SnipeItDepartment.ps1 @@ -18,17 +18,17 @@ ID number of manager .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Department -name "Department1" -company_id 1 -localtion_id 1 -manager_id 3 #> -function New-Department() { +function New-SnipeItDepartment() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/New-License.ps1 b/SnipeitPS/Public/New-SnipeItLicense.ps1 similarity index 94% rename from SnipeitPS/Public/New-License.ps1 rename to SnipeitPS/Public/New-SnipeItLicense.ps1 index fb38435..98b9a3b 100644 --- a/SnipeitPS/Public/New-License.ps1 +++ b/SnipeitPS/Public/New-SnipeItLicense.ps1 @@ -57,17 +57,17 @@ Termination date for license. .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Licence -name "License" -seats 3 -company_id 1 #> -function New-License() { +function New-SnipeItLicense() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/New-Location.ps1 b/SnipeitPS/Public/New-SnipeItLocation.ps1 similarity index 90% rename from SnipeitPS/Public/New-Location.ps1 rename to SnipeitPS/Public/New-SnipeItLocation.ps1 index d15cc93..d2c910e 100644 --- a/SnipeitPS/Public/New-Location.ps1 +++ b/SnipeitPS/Public/New-SnipeItLocation.ps1 @@ -36,16 +36,16 @@ The manager ID of the location .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Location -name "Room 1" -address "123 Asset Street" -parent_id 14 #> -function New-Location() { +function New-SnipeItLocation() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/New-Manufacturer.ps1 b/SnipeitPS/Public/New-SnipeItManufacturer.ps1 similarity index 84% rename from SnipeitPS/Public/New-Manufacturer.ps1 rename to SnipeitPS/Public/New-SnipeItManufacturer.ps1 index d85ee18..55a06e4 100644 --- a/SnipeitPS/Public/New-Manufacturer.ps1 +++ b/SnipeitPS/Public/New-SnipeItManufacturer.ps1 @@ -9,16 +9,16 @@ Name of the Manufacturer .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Manufacturer -name "HP" #> -function New-Manufacturer() +function New-SnipeItManufacturer() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-Model.ps1 b/SnipeitPS/Public/New-SnipeItModel.ps1 similarity index 91% rename from SnipeitPS/Public/New-Model.ps1 rename to SnipeitPS/Public/New-SnipeItModel.ps1 index 87f0fad..cc980e1 100644 --- a/SnipeitPS/Public/New-Model.ps1 +++ b/SnipeitPS/Public/New-SnipeItModel.ps1 @@ -21,16 +21,16 @@ Fieldset ID that the asset uses (Custom fields) .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 #> -function New-Model() +function New-SnipeItModel() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/New-User.ps1 b/SnipeitPS/Public/New-SnipeItUser.ps1 similarity index 93% rename from SnipeitPS/Public/New-User.ps1 rename to SnipeitPS/Public/New-SnipeItUser.ps1 index 4630f06..b5bb851 100644 --- a/SnipeitPS/Public/New-User.ps1 +++ b/SnipeitPS/Public/New-SnipeItUser.ps1 @@ -48,10 +48,10 @@ Mark user as import from ldap .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-user -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 @@ -60,7 +60,7 @@ .NOTES General notes #> -function New-User() { +function New-SnipeItUser() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/Remove-Asset.ps1 b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 similarity index 74% rename from SnipeitPS/Public/Remove-Asset.ps1 rename to SnipeitPS/Public/Remove-SnipeItAsset.ps1 index 095cd0d..90226e1 100644 --- a/SnipeitPS/Public/Remove-Asset.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 @@ -1,21 +1,21 @@ <# .SYNOPSIS - Removes Asset to Snipe-it asset system + Removes Asset from Snipe-it asset system .DESCRIPTION - Long description + Removes Asset from Snipe-it asset system .PARAMETER ID Unique ID For Asset to be removed .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Remove-Asset -ID 44 -Verbose #> -function Remove-Asset () +function Remove-SnipeItAsset () { [CmdletBinding( SupportsShouldProcess = $true, @@ -24,7 +24,7 @@ function Remove-Asset () Param( [parameter(mandatory = $true)] - [string]$ID, + [int]$ID, [parameter(mandatory = $true)] [string]$URL, [parameter(mandatory = $true)] diff --git a/SnipeitPS/Public/Remove-AssetMaintenance.ps1 b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 similarity index 81% rename from SnipeitPS/Public/Remove-AssetMaintenance.ps1 rename to SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 index 655269b..9ae641c 100644 --- a/SnipeitPS/Public/Remove-AssetMaintenance.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 @@ -1,4 +1,4 @@ -function Remove-AssetMaintenance { +function Remove-SnipeItAssetMaintenance { <# .SYNOPSIS Remove asset maintenance from Snipe-it asset system @@ -7,10 +7,10 @@ function Remove-AssetMaintenance { .PARAMETER ID Unique ID of the asset maintenance to be removed .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Remove-AssetMaintenance -ID 44 -url $url -apiKey $secret -Verbose @@ -22,7 +22,7 @@ function Remove-AssetMaintenance { param ( # Asset maintenance ID [Parameter(Mandatory = $true)] - [string] + [int] $ID, # SnipeIt URL diff --git a/SnipeitPS/Public/Remove-User.ps1 b/SnipeitPS/Public/Remove-SnipeItUser.ps1 similarity index 84% rename from SnipeitPS/Public/Remove-User.ps1 rename to SnipeitPS/Public/Remove-SnipeItUser.ps1 index 4d5c7b1..d32e306 100644 --- a/SnipeitPS/Public/Remove-User.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItUser.ps1 @@ -7,16 +7,16 @@ Unique ID For User to be removed .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Remove-User -ID 44 -url $url -apiKey $secret -Verbose #> -function Remove-User () +function Remove-SnipeItUser () { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/Reset-AssetOwner.ps1 b/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 similarity index 87% rename from SnipeitPS/Public/Reset-AssetOwner.ps1 rename to SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 index beecfcf..fce8338 100644 --- a/SnipeitPS/Public/Reset-AssetOwner.ps1 +++ b/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 @@ -17,15 +17,15 @@ Notes about checkin .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command .EXAMPLE Remove-User -ID 44 -url $url -apiKey $secret -Verbose #> -function Reset-AssetOwner() { +function Reset-SnipeItAssetOwner() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Medium" diff --git a/SnipeitPS/Public/Set-Accessory.ps1 b/SnipeitPS/Public/Set-SnipeItAccessory.ps1 similarity index 92% rename from SnipeitPS/Public/Set-Accessory.ps1 rename to SnipeitPS/Public/Set-SnipeItAccessory.ps1 index 298a0c9..9e3ec18 100644 --- a/SnipeitPS/Public/Set-Accessory.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAccessory.ps1 @@ -48,16 +48,16 @@ ID number of the location the accessory is assigned to Min quantity of the accessory before alert is triggered .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command .PARAMETER apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command .EXAMPLE Set-Accessory -id 1 -qty 3 #> -function Set-Accessory() { +function Set-SnipeItAccessory() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/Set-Asset.ps1 b/SnipeitPS/Public/Set-SnipeItAsset.ps1 similarity index 94% rename from SnipeitPS/Public/Set-Asset.ps1 rename to SnipeitPS/Public/Set-SnipeItAsset.ps1 index df45913..4688bfe 100644 --- a/SnipeitPS/Public/Set-Asset.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAsset.ps1 @@ -51,10 +51,10 @@ The id that corresponds to the location where the asset is usually located when not checked out .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command .PARAMETER customfields Hastable of custom fields and extra fields that need passing through to Snipeit @@ -66,7 +66,7 @@ Set-Asset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } #> -function Set-Asset() +function Set-SnipeItAsset() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/Set-AssetOwner.ps1 b/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 similarity index 93% rename from SnipeitPS/Public/Set-AssetOwner.ps1 rename to SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 index 15b5284..5df1044 100644 --- a/SnipeitPS/Public/Set-AssetOwner.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 @@ -25,15 +25,15 @@ Optional date to override the checkout time of now .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Remove-User -ID 44 -url $url -apiKey $secret -Verbose #> -function Set-AssetOwner() +function Set-SnipeItAssetOwner() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/Set-Components.ps1 b/SnipeitPS/Public/Set-SnipeItComponents.ps1 similarity index 90% rename from SnipeitPS/Public/Set-Components.ps1 rename to SnipeitPS/Public/Set-SnipeItComponents.ps1 index 15eaf72..558d646 100644 --- a/SnipeitPS/Public/Set-Components.ps1 +++ b/SnipeitPS/Public/Set-SnipeItComponents.ps1 @@ -27,10 +27,10 @@ Date accessory was purchased Cost of item being purchased. .PARAMETER url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey -User's API Key for Snipeit, can be set using Set-Info command +User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE An example @@ -38,7 +38,7 @@ An example .NOTES General notes #> -function Set-Component() +function Set-SnipeItComponent() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/Set-Info.ps1 b/SnipeitPS/Public/Set-SnipeItInfo.ps1 similarity index 89% rename from SnipeitPS/Public/Set-Info.ps1 rename to SnipeitPS/Public/Set-SnipeItInfo.ps1 index 79e348d..1283fa7 100644 --- a/SnipeitPS/Public/Set-Info.ps1 +++ b/SnipeitPS/Public/Set-SnipeItInfo.ps1 @@ -5,15 +5,15 @@ Set apikey and url user to connect Snipe-It system .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Set-Info -url $url -apiKey -Verbose + Set-SnipeItInfo -url $url -apiKey -Verbose #> -function Set-Info { +function Set-SnipeItInfo { [CmdletBinding()] [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', '')] param ( diff --git a/SnipeitPS/Public/Set-License.ps1 b/SnipeitPS/Public/Set-SnipeItLicense.ps1 similarity index 94% rename from SnipeitPS/Public/Set-License.ps1 rename to SnipeitPS/Public/Set-SnipeItLicense.ps1 index 52d92b0..91a6571 100644 --- a/SnipeitPS/Public/Set-License.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLicense.ps1 @@ -60,17 +60,17 @@ Termination date for license. .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Set-Licence -name "License" -seats 3 -company_id 1 #> -function Set-License() { +function Set-SnipeItLicense() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Low" diff --git a/SnipeitPS/Public/Set-SnipeitLocation.ps1 b/SnipeitPS/Public/Set-SnipeItLocation.ps1 similarity index 92% rename from SnipeitPS/Public/Set-SnipeitLocation.ps1 rename to SnipeitPS/Public/Set-SnipeItLocation.ps1 index e517d07..1c4687e 100644 --- a/SnipeitPS/Public/Set-SnipeitLocation.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLocation.ps1 @@ -36,10 +36,10 @@ Parent location as id .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Set-SnipeitLocation -id 123 -name "Some storage" -parent_id 100 diff --git a/SnipeitPS/Public/Set-Model.ps1 b/SnipeitPS/Public/Set-SnipeItModel.ps1 similarity index 90% rename from SnipeitPS/Public/Set-Model.ps1 rename to SnipeitPS/Public/Set-SnipeItModel.ps1 index 0020c1a..5da86eb 100644 --- a/SnipeitPS/Public/Set-Model.ps1 +++ b/SnipeitPS/Public/Set-SnipeItModel.ps1 @@ -24,16 +24,16 @@ Fieldset ID that the asset uses (Custom fields) .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command + Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 #> -function Set-Model() { +function Set-SnipeItModel() { [CmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = "Medium" diff --git a/SnipeitPS/Public/Set-User.ps1 b/SnipeitPS/Public/Set-SnipeItUser.ps1 similarity index 92% rename from SnipeitPS/Public/Set-User.ps1 rename to SnipeitPS/Public/Set-SnipeItUser.ps1 index f609733..cb8e5bd 100644 --- a/SnipeitPS/Public/Set-User.ps1 +++ b/SnipeitPS/Public/Set-SnipeItUser.ps1 @@ -48,10 +48,10 @@ Mark user as import from ldap .PARAMETER url - URL of Snipeit system, can be set using Set-Info command + URL of Snipeit system, can be set using Set-SnipeItInfo command .PARAMETER apiKey - User's API Key for Snipeit, can be set using Set-Info command + User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE Update-user -id 3 -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 @@ -60,7 +60,7 @@ .NOTES General notes #> -function Set-User() { +function Set-SnipeItUser() { [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 86c49cecf24c4ced6da165df24a18a9439da9aa9..7cbd08dc27a3908d55e73ee2840be5c0cdeb06b3 100644 GIT binary patch delta 999 zcmZvZ&r4fD5XTq1gqK=k_Q%@|Cd4F$hwY1oAQFOD@uUPndNuxNwV(&v(j0P0XnHEe z+gwXA|A8R%;KdvSJ$UfwP3*B0s)hF4-FZ>sz7WD^=R4n>H#>7#J*^$K;=?b=9@!!9 z$TnFdby(r!&}B}vUu*J8NIT)rLRyj*t!j7N54qa3Y`JP;GUWPAXNOEbV{G1XZ?cM| zth?c!&sg!%8~(DAb*m$@kP;C~UE#i^H2H$1oN&9=9iO&5ZCV^qy(VTXABZAcNM}U9 zl~nZ}Uh6&Vkq=}W-ivIsZ#UpGe?Y}eRvMtLyY?$OavJAp_8XHC^G%Fz+?j{7*;aqf z%(WLsO@E8Jvp3`|bVT;y&VAi6R_60$OaFY**R|f@oO)b!PT8|Ejsx}7nvCf*q#j+X zogr9C=3q4*gI)CmKE`E_5%|pW`s~23cp90aDdaNEAV1L{e@t^2-_pRBVFip|F%S8b zC6MQA6#0(@K95WIA{=OO2UdBkcb-Cac^dhLXOMZ3N3MySrU%FR|5Ho^IoCsOxC!LG zD|Oz1?>aX8;pUK1W{_1G=nWb8OdrN~Aq#lFt^(f+&0X~zzNrbgRNhe|c@_B&+kFfy delta 337 zcmX>Sd%SQLb5;2=>rl $scriptRoot = $PSScriptRoot + '\Public' Get-ChildItem $scriptRoot *.ps1 | ForEach-Object { @@ -9,3 +13,41 @@ $scriptRoot = $PSScriptRoot + '\Private' Get-ChildItem $scriptRoot *.ps1 | ForEach-Object { Import-Module $_.FullName } + +#Create unprefixed aliases +Set-Alias -Name Get-Asset -Value Get-SnipeItAsset +Set-Alias -Name Get-AssetMaintenance -Value Get-SnipeItAssetMaintenance +Set-Alias -Name Get-Category -Value Get-SnipeItCategory +Set-Alias -Name Get-Company -Value Get-SnipeItCompany +Set-Alias -Name Get-Component -Value Get-SnipeItCompany +Set-Alias -Name Get-CustomField -Value Get-SnipeItCustomField +Set-Alias -Name Get-Department -Value Get-SnipeItDepartment +Set-Alias -Name Get-Fieldset -Value Get-SnipeItFieldset +Set-Alias -Name Get-Manufacturer -Value Get-SnipeItManufacturer +Set-Alias -Name Get-Model -Value Get-SnipeItModel +Set-Alias -Name Get-Status -Value Get-SnipeItStatus +Set-Alias -Name Get-Supplier -Value Get-SnipeItSupplier +Set-Alias -Name Get-User -Value Get-SnipeItUser +Set-Alias -Name New-Asset -Value New-SnipeItAsset +Set-Alias -Name New-AssetMaintenance -Value New-SnipeItAssetMaintenance +Set-Alias -Name New-Category -Value New-SnipeItCategory +Set-Alias -Name New-Component -Value New-SnipeItComponent +Set-Alias -Name New-CustomField -Value New-SnipeItCustomField +Set-Alias -Name New-Department -Value New-SnipeItDepartment +Set-Alias -Name New-License -Value New-SnipeItLicense +Set-Alias -Name Set-License -Value Set-SnipeItLicense +Set-Alias -Name New-Location -Value New-SnipeItLocation +Set-Alias -Name New-Manufacturer -Value New-Manufacturer +Set-Alias -Name New-Model -Value New-SnipeItModel +Set-Alias -Name New-User -Value New-SnipeItUser +Set-Alias -Name Set-Asset -Value Set-SnipeItAsset +Set-Alias -Name Set-AssetOwner -Value Set-SnipeItAssetOwner +Set-Alias -Name Set-Component -Value Set-SnipeItComponent +Set-Alias -Name Set-Model -Value Set-SnipeItModel +Set-Alias -Name Set-Info -Value Set-SnipeItInfo +Set-Alias -Name Set-User -Value Set-SnipeItUser +Set-Alias -Name New-Accessory -Value New-SnipeItAccessory +Set-Alias -Name Set-Accessory -Value Set-SnipeItAccessory +Set-Alias -Name Get-Accessory -Value Get-SnipeItAccessory +Set-Alias -Name Remove-Asset -Value Remove-SnipeItAsset +Set-Alias -Name Remove-User -Value Remove-SnipeItUser diff --git a/docs/Get-Accessory.md b/docs/Get-SnipeItAccessory.md similarity index 96% rename from docs/Get-Accessory.md rename to docs/Get-SnipeItAccessory.md index bba1853..1a6b592 100644 --- a/docs/Get-Accessory.md +++ b/docs/Get-SnipeItAccessory.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Accessory +# Get-SnipeItAccessory ## SYNOPSIS Gets a list of Snipe-it Accessories @@ -13,7 +13,7 @@ Gets a list of Snipe-it Accessories ## SYNTAX ``` -Get-Accessory [[-search] ] [[-company_id] ] [[-category_id] ] +Get-SnipeItAccessory [[-search] ] [[-company_id] ] [[-category_id] ] [[-manufacturer_id] ] [[-supplier_id] ] [[-sort] ] [[-order] ] [[-limit] ] [[-offset] ] [-all] [-url] [-apiKey] [] ``` diff --git a/docs/Get-Asset.md b/docs/Get-SnipeItAsset.md similarity index 97% rename from docs/Get-Asset.md rename to docs/Get-SnipeItAsset.md index c723fed..f10fa59 100644 --- a/docs/Get-Asset.md +++ b/docs/Get-SnipeItAsset.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Asset +# Get-SnipeItAsset ## SYNOPSIS Gets a list of Snipe-it Assets or specific asset @@ -13,7 +13,7 @@ Gets a list of Snipe-it Assets or specific asset ## SYNTAX ``` -Get-Asset [[-search] ] [[-id] ] [[-asset_tag] ] [[-asset_serial] ] +Get-SnipeItAsset [[-search] ] [[-id] ] [[-asset_tag] ] [[-asset_serial] ] [[-order_number] ] [[-model_id] ] [[-category_id] ] [[-manufacturer_id] ] [[-company_id] ] [[-location_id] ] [[-depreciation_id] ] [[-requestable] ] [[-status] ] [[-status_id] ] [[-sort] ] [[-order] ] [[-limit] ] @@ -156,13 +156,13 @@ Accept wildcard characters: False ID number of excact snipeit asset ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-AssetMaintenance.md b/docs/Get-SnipeItAssetMaintenance.md similarity index 95% rename from docs/Get-AssetMaintenance.md rename to docs/Get-SnipeItAssetMaintenance.md index 9a45aca..fb3de97 100644 --- a/docs/Get-AssetMaintenance.md +++ b/docs/Get-SnipeItAssetMaintenance.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-AssetMaintenance +# Get-SnipeItAssetMaintenance ## SYNOPSIS Lists Snipe-it Assets Maintenances @@ -13,7 +13,7 @@ Lists Snipe-it Assets Maintenances ## SYNTAX ``` -Get-AssetMaintenance [[-search] ] [[-asset_id] ] [[-sort] ] [[-order] ] +Get-SnipeItAssetMaintenance [[-search] ] [[-asset_id] ] [[-sort] ] [[-order] ] [[-limit] ] [-all] [[-offset] ] [-url] [-apiKey] [] ``` diff --git a/docs/Get-Category.md b/docs/Get-SnipeItCategory.md similarity index 91% rename from docs/Get-Category.md rename to docs/Get-SnipeItCategory.md index c203606..97df32a 100644 --- a/docs/Get-Category.md +++ b/docs/Get-SnipeItCategory.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Category +# Get-SnipeItCategory ## SYNOPSIS Gets a list of Snipe-it Categories @@ -13,8 +13,8 @@ Gets a list of Snipe-it Categories ## SYNTAX ``` -Get-Category [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] - [-all] [-url] [-apiKey] [] +Get-SnipeItCategory [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -68,13 +68,13 @@ Accept wildcard characters: False A id of specific Category ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-Company.md b/docs/Get-SnipeItCompany.md similarity index 91% rename from docs/Get-Company.md rename to docs/Get-SnipeItCompany.md index 1ed64b8..85f877e 100644 --- a/docs/Get-Company.md +++ b/docs/Get-SnipeItCompany.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Company +# Get-SnipeItCompany ## SYNOPSIS Gets a list of Snipe-it Companies @@ -13,8 +13,8 @@ Gets a list of Snipe-it Companies ## SYNTAX ``` -Get-Company [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] - [-all] [-url] [-apiKey] [] +Get-SnipeItCompany [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -72,13 +72,13 @@ Accept wildcard characters: False A id of specific Company ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-Component.md b/docs/Get-SnipeItComponent.md similarity index 95% rename from docs/Get-Component.md rename to docs/Get-SnipeItComponent.md index 16badb9..5ee4bb1 100644 --- a/docs/Get-Component.md +++ b/docs/Get-SnipeItComponent.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Component +# Get-SnipeItComponent ## SYNOPSIS Gets a list of Snipe-it Components @@ -13,7 +13,7 @@ Gets a list of Snipe-it Components ## SYNTAX ``` -Get-Component [[-search] ] [[-id] ] [[-category_id] ] [[-company_id] ] +Get-SnipeItComponent [[-search] ] [[-id] ] [[-category_id] ] [[-company_id] ] [[-location_id] ] [[-order] ] [[-sort] ] [[-limit] ] [[-offset] ] [-all] [-url] [-apiKey] [] ``` @@ -110,13 +110,13 @@ Accept wildcard characters: False A id of specific Component ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-CustomField.md b/docs/Get-SnipeItCustomField.md similarity index 74% rename from docs/Get-CustomField.md rename to docs/Get-SnipeItCustomField.md index a62a30a..06a39c0 100644 --- a/docs/Get-CustomField.md +++ b/docs/Get-SnipeItCustomField.md @@ -1,19 +1,19 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-CustomField +# Get-SnipeItCustomField ## SYNOPSIS -Returns a list of all Snipe-IT custom fields +Returns specific Snipe-IT custom field or a list of all custom field ## SYNTAX ``` -Get-CustomField [-url] [-apiKey] [] +Get-SnipeItCustomField [[-id] ] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -37,12 +37,27 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -id +A id of specific field + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -url URL of Snipeit system, can be set using Set-Info command @@ -52,7 +67,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-Department.md b/docs/Get-SnipeItDepartment.md similarity index 91% rename from docs/Get-Department.md rename to docs/Get-SnipeItDepartment.md index 7059601..b5ef892 100644 --- a/docs/Get-Department.md +++ b/docs/Get-SnipeItDepartment.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Department +# Get-SnipeItDepartment ## SYNOPSIS Gets a list of Snipe-it Departments @@ -13,8 +13,8 @@ Gets a list of Snipe-it Departments ## SYNTAX ``` -Get-Department [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] - [-all] [[-sort] ] [-url] [-apiKey] [] +Get-SnipeItDepartment [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [[-sort] ] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -73,13 +73,13 @@ Accept wildcard characters: False A id of specific Department ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-Fieldset.md b/docs/Get-SnipeItFieldset.md similarity index 77% rename from docs/Get-Fieldset.md rename to docs/Get-SnipeItFieldset.md index 8f7a118..2f3c54d 100644 --- a/docs/Get-Fieldset.md +++ b/docs/Get-SnipeItFieldset.md @@ -1,19 +1,19 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Fieldset +# Get-SnipeItFieldset ## SYNOPSIS -Gets a list of Snipe-it Fieldsets +Returns a fieldset or list of Snipe-it Fieldsets ## SYNTAX ``` -Get-Fieldset [-url] [-apiKey] [] +Get-SnipeItFieldset [[-id] ] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -42,12 +42,27 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -id +A id of specific fieldset + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -url URL of Snipeit system, can be set using Set-Info command @@ -57,7 +72,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-Manufacturer.md b/docs/Get-SnipeItManufacturer.md similarity index 94% rename from docs/Get-Manufacturer.md rename to docs/Get-SnipeItManufacturer.md index b1006bf..f9c233f 100644 --- a/docs/Get-Manufacturer.md +++ b/docs/Get-SnipeItManufacturer.md @@ -5,7 +5,7 @@ online version: schema: 2.0.0 --- -# Get-Manufacturer +# Get-SnipeItManufacturer ## SYNOPSIS # Gets a list of Snipe-it Manufacturers @@ -13,7 +13,7 @@ schema: 2.0.0 ## SYNTAX ``` -Get-Manufacturer [[-search] ] [[-id] ] [[-order] ] [[-limit] ] +Get-SnipeItManufacturer [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] [-all] [-url] [-apiKey] [] ``` @@ -72,13 +72,13 @@ Accept wildcard characters: False A id of specific Manufactuter ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-Model.md b/docs/Get-SnipeItModel.md similarity index 92% rename from docs/Get-Model.md rename to docs/Get-SnipeItModel.md index a3ad1ea..77b2d62 100644 --- a/docs/Get-Model.md +++ b/docs/Get-SnipeItModel.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Model +# Get-SnipeItModel ## SYNOPSIS Gets a list of Snipe-it Models @@ -13,8 +13,8 @@ Gets a list of Snipe-it Models ## SYNTAX ``` -Get-Model [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] - [-all] [-url] [-apiKey] [] +Get-SnipeItModel [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [-url] [-apiKey] [] ``` ## DESCRIPTION diff --git a/docs/Get-Status.md b/docs/Get-SnipeItStatus.md similarity index 91% rename from docs/Get-Status.md rename to docs/Get-SnipeItStatus.md index 21672b6..2a287e0 100644 --- a/docs/Get-Status.md +++ b/docs/Get-SnipeItStatus.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Get-Status +# Get-SnipeItStatus ## SYNOPSIS Gets a list of Snipe-it Status Labels @@ -13,8 +13,8 @@ Gets a list of Snipe-it Status Labels ## SYNTAX ``` -Get-Status [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] - [-all] [-url] [-apiKey] [] +Get-SnipeItStatus [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -68,13 +68,13 @@ Accept wildcard characters: False A id of specific Status Label ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-Supplier.md b/docs/Get-SnipeItSupplier.md similarity index 91% rename from docs/Get-Supplier.md rename to docs/Get-SnipeItSupplier.md index 2996b85..cefdd7c 100644 --- a/docs/Get-Supplier.md +++ b/docs/Get-SnipeItSupplier.md @@ -5,7 +5,7 @@ online version: schema: 2.0.0 --- -# Get-Supplier +# Get-SnipeItSupplier ## SYNOPSIS # Gets a list of Snipe-it Suppliers @@ -13,8 +13,8 @@ schema: 2.0.0 ## SYNTAX ``` -Get-Supplier [[-search] ] [[-id] ] [[-order] ] [[-limit] ] [[-offset] ] - [-all] [-url] [-apiKey] [] +Get-SnipeItSupplier [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [-url] [-apiKey] [] ``` ## DESCRIPTION @@ -68,13 +68,13 @@ Accept wildcard characters: False A id of specific Suplier ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Get-User.md b/docs/Get-SnipeItUser.md similarity index 97% rename from docs/Get-User.md rename to docs/Get-SnipeItUser.md index 61cf14e..7b48f8f 100644 --- a/docs/Get-User.md +++ b/docs/Get-SnipeItUser.md @@ -5,7 +5,7 @@ online version: schema: 2.0.0 --- -# Get-User +# Get-SnipeItUser ## SYNOPSIS # Gets a list of Snipe-it Users @@ -13,7 +13,7 @@ schema: 2.0.0 ## SYNTAX ``` -Get-User [[-search] ] [[-id] ] [[-company_id] ] [[-location_id] ] +Get-SnipeItUser [[-search] ] [[-id] ] [[-company_id] ] [[-location_id] ] [[-group_id] ] [[-department_id] ] [[-username] ] [[-email] ] [[-order] ] [[-limit] ] [[-offset] ] [-all] [-url] [-apiKey] [] diff --git a/docs/Get-SnipeitLocation.md b/docs/Get-SnipeitLocation.md deleted file mode 100644 index f99db67..0000000 --- a/docs/Get-SnipeitLocation.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -external help file: SnipeItPS-help.xml -Module Name: SnipeitPS -online version: -schema: 2.0.0 ---- - -# Get-SnipeitLocation - -## SYNOPSIS -Gets a list of Snipe-it Locations - -## SYNTAX - -``` -Get-SnipeitLocation [[-search] ] [[-id] ] [[-order] ] [[-limit] ] - [[-offset] ] [-all] [-url] [-apiKey] [] -``` - -## DESCRIPTION -{{ Fill in the Description }} - -## EXAMPLES - -### EXAMPLE 1 -``` -Get-Location -search Location1 -``` - -### EXAMPLE 2 -``` -Get-Location -id 3 -``` - -## PARAMETERS - -### -all -A return all results, works with -offset and other parameters - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 7 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -id -A id of specific Location - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: 50 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -offset -Offset to use - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -order -{{ Fill order Description }} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: Desc -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -search -A text string to search the Locations data - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -url -URL of Snipeit system, can be set using Set-Info command - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS diff --git a/docs/New-Asset.md b/docs/New-SnipeItAsset.md similarity index 97% rename from docs/New-Asset.md rename to docs/New-SnipeItAsset.md index f06a49c..76e1b2a 100644 --- a/docs/New-Asset.md +++ b/docs/New-SnipeItAsset.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Asset +# New-SnipeItAsset ## SYNOPSIS Add a new Asset to Snipe-it asset system @@ -13,7 +13,7 @@ Add a new Asset to Snipe-it asset system ## SYNTAX ``` -New-Asset [-status_id] [-model_id] [[-name] ] [[-asset_tag] ] +New-SnipeItAsset [-status_id] [-model_id] [[-name] ] [[-asset_tag] ] [[-serial] ] [[-company_id] ] [[-order_number] ] [[-notes] ] [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] [[-supplier_id] ] [[-rtd_location_id] ] [-url] [-apiKey] [[-customfields] ] [-WhatIf] diff --git a/docs/New-AssetMaintenance.md b/docs/New-SnipeItAssetMaintenance.md similarity index 96% rename from docs/New-AssetMaintenance.md rename to docs/New-SnipeItAssetMaintenance.md index 72782c8..8474800 100644 --- a/docs/New-AssetMaintenance.md +++ b/docs/New-SnipeItAssetMaintenance.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-AssetMaintenance +# New-SnipeItAssetMaintenance ## SYNOPSIS Add a new Asset maintenence to Snipe-it asset system @@ -13,7 +13,7 @@ Add a new Asset maintenence to Snipe-it asset system ## SYNTAX ``` -New-AssetMaintenance [-asset_id] [-supplier_id] [-asset_maintenance_type] +New-SnipeItAssetMaintenance [-asset_id] [-supplier_id] [-asset_maintenance_type] [-title] [-start_date] [[-completion_date] ] [[-is_warranty] ] [[-cost] ] [[-notes] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] diff --git a/docs/New-Category.md b/docs/New-SnipeItCategory.md similarity index 92% rename from docs/New-Category.md rename to docs/New-SnipeItCategory.md index 140e5f6..3b1b56a 100644 --- a/docs/New-Category.md +++ b/docs/New-SnipeItCategory.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Category +# New-SnipeItCategory ## SYNOPSIS Create a new Snipe-IT Category @@ -13,8 +13,8 @@ Create a new Snipe-IT Category ## SYNTAX ``` -New-Category [-name] [-category_type] [-url] [-apiKey] [-use_default_eula] - [-require_acceptance] [-checkin_email] [-WhatIf] [-Confirm] [] +New-SnipeItCategory [-name] [-category_type] [-url] [-apiKey] + [-use_default_eula] [-require_acceptance] [-checkin_email] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/docs/New-Component.md b/docs/New-SnipeItComponent.md similarity index 96% rename from docs/New-Component.md rename to docs/New-SnipeItComponent.md index a3d6a17..8bc5144 100644 --- a/docs/New-Component.md +++ b/docs/New-SnipeItComponent.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Component +# New-SnipeItComponent ## SYNOPSIS Create a new component @@ -13,7 +13,7 @@ Create a new component ## SYNTAX ``` -New-Component [-name] [-category_id] [-qty] [[-company_id] ] +New-SnipeItComponent [-name] [-category_id] [-qty] [[-company_id] ] [[-location_id] ] [[-purchase_date] ] [[-purchase_cost] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/New-CustomField.md b/docs/New-SnipeItCustomField.md similarity index 95% rename from docs/New-CustomField.md rename to docs/New-SnipeItCustomField.md index fc035e2..fb55d4a 100644 --- a/docs/New-CustomField.md +++ b/docs/New-SnipeItCustomField.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-CustomField +# New-SnipeItCustomField ## SYNOPSIS Add a new Custom Field to Snipe-it asset system @@ -13,7 +13,7 @@ Add a new Custom Field to Snipe-it asset system ## SYNTAX ``` -New-CustomField [-Name] [[-HelpText] ] [[-Element] ] [[-Format] ] +New-SnipeItCustomField [-Name] [[-HelpText] ] [[-Element] ] [[-Format] ] [[-field_encrypted] ] [[-CustomFormat] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/New-Department.md b/docs/New-SnipeItDepartment.md similarity index 95% rename from docs/New-Department.md rename to docs/New-SnipeItDepartment.md index fdf1cf4..c94b892 100644 --- a/docs/New-Department.md +++ b/docs/New-SnipeItDepartment.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Department +# New-SnipeItDepartment ## SYNOPSIS Creates a department @@ -13,7 +13,7 @@ Creates a department ## SYNTAX ``` -New-Department [-name] [[-company_id] ] [[-location_id] ] [[-manager_id] ] +New-SnipeItDepartment [-name] [[-company_id] ] [[-location_id] ] [[-manager_id] ] [[-notes] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/New-License.md b/docs/New-SnipeItLicense.md similarity index 97% rename from docs/New-License.md rename to docs/New-SnipeItLicense.md index 5e8c316..e628927 100644 --- a/docs/New-License.md +++ b/docs/New-SnipeItLicense.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-License +# New-SnipeItLicense ## SYNOPSIS Creates a licence @@ -13,7 +13,7 @@ Creates a licence ## SYNTAX ``` -New-License [-name] [-seats] [[-category_id] ] [[-company_id] ] +New-SnipeItLicense [-name] [-seats] [[-category_id] ] [[-company_id] ] [[-expiration_date] ] [[-license_email] ] [[-license_name] ] [[-maintained] ] [[-manufacturer_id] ] [[-notes] ] [[-order_number] ] [[-purchase_cost] ] [[-purchase_date] ] [[-reassignable] ] [[-serial] ] diff --git a/docs/New-Location.md b/docs/New-SnipeItLocation.md similarity index 96% rename from docs/New-Location.md rename to docs/New-SnipeItLocation.md index 64ad41d..3ec6c2b 100644 --- a/docs/New-Location.md +++ b/docs/New-SnipeItLocation.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Location +# New-SnipeItLocation ## SYNOPSIS Add a new Location to Snipe-it asset system @@ -13,7 +13,7 @@ Add a new Location to Snipe-it asset system ## SYNTAX ``` -New-Location [-name] [[-address] ] [[-address2] ] [[-state] ] +New-SnipeItLocation [-name] [[-address] ] [[-address2] ] [[-state] ] [[-country] ] [[-zip] ] [[-parent_id] ] [[-manager_id] ] [[-ldap_ou] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/New-Manufacturer.md b/docs/New-SnipeItManufacturer.md similarity index 92% rename from docs/New-Manufacturer.md rename to docs/New-SnipeItManufacturer.md index 5d61fbd..5a07084 100644 --- a/docs/New-Manufacturer.md +++ b/docs/New-SnipeItManufacturer.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Manufacturer +# New-SnipeItManufacturer ## SYNOPSIS Add a new Manufacturer to Snipe-it asset system @@ -13,7 +13,8 @@ Add a new Manufacturer to Snipe-it asset system ## SYNTAX ``` -New-Manufacturer [-Name] [-url] [-apiKey] [-WhatIf] [-Confirm] [] +New-SnipeItManufacturer [-Name] [-url] [-apiKey] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/docs/New-Model.md b/docs/New-SnipeItModel.md similarity index 95% rename from docs/New-Model.md rename to docs/New-SnipeItModel.md index 18e13d8..6f69c93 100644 --- a/docs/New-Model.md +++ b/docs/New-SnipeItModel.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# New-Model +# New-SnipeItModel ## SYNOPSIS Add a new Model to Snipe-it asset system @@ -13,7 +13,7 @@ Add a new Model to Snipe-it asset system ## SYNTAX ``` -New-Model [-name] [[-model_number] ] [-category_id] [-manufacturer_id] +New-SnipeItModel [-name] [[-model_number] ] [-category_id] [-manufacturer_id] [[-eol] ] [-fieldset_id] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/New-User.md b/docs/New-SnipeItUser.md similarity index 96% rename from docs/New-User.md rename to docs/New-SnipeItUser.md index 520d221..3ecf106 100644 --- a/docs/New-User.md +++ b/docs/New-SnipeItUser.md @@ -5,7 +5,7 @@ online version: schema: 2.0.0 --- -# New-User +# New-SnipeItUser ## SYNOPSIS Creates a new user @@ -13,7 +13,7 @@ Creates a new user ## SYNTAX ``` -New-User [-first_name] [-last_name] [-username] [[-password] ] +New-SnipeItUser [-first_name] [-last_name] [-username] [[-password] ] [[-activated] ] [[-notes] ] [[-jobtitle] ] [[-email] ] [[-phone] ] [[-company_id] ] [[-location_id] ] [[-department_id] ] [[-manager_id] ] [[-employee_num] ] [[-ldap_import] ] [-url] [-apiKey] [-WhatIf] [-Confirm] @@ -130,7 +130,7 @@ Users first name ```yaml Type: String Parameter Sets: (All) -Aliases: firstName +Aliases: Required: True Position: 1 @@ -160,7 +160,7 @@ Users last name ```yaml Type: String Parameter Sets: (All) -Aliases: lastName +Aliases: Required: True Position: 2 @@ -175,7 +175,7 @@ Mark user as import from ldap ```yaml Type: Boolean Parameter Sets: (All) -Aliases: ldap_user +Aliases: Required: False Position: 15 diff --git a/docs/Remove-Asset.md b/docs/Remove-SnipeItAsset.md similarity index 91% rename from docs/Remove-Asset.md rename to docs/Remove-SnipeItAsset.md index 4e9c4fd..de978c4 100644 --- a/docs/Remove-Asset.md +++ b/docs/Remove-SnipeItAsset.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Remove-Asset +# Remove-SnipeItAsset ## SYNOPSIS Removes Asset to Snipe-it asset system @@ -13,7 +13,7 @@ Removes Asset to Snipe-it asset system ## SYNTAX ``` -Remove-Asset [-ID] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] +Remove-SnipeItAsset [-ID] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,13 +47,13 @@ Accept wildcard characters: False Unique ID For Asset to be removed ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True Position: 1 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Remove-User.md b/docs/Remove-SnipeItUser.md similarity index 93% rename from docs/Remove-User.md rename to docs/Remove-SnipeItUser.md index 5e28ac0..d0ff674 100644 --- a/docs/Remove-User.md +++ b/docs/Remove-SnipeItUser.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Remove-User +# Remove-SnipeItUser ## SYNOPSIS Removes User from Snipe-it asset system @@ -13,7 +13,7 @@ Removes User from Snipe-it asset system ## SYNTAX ``` -Remove-User [-ID] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] +Remove-SnipeItUser [-ID] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/docs/Set-Accessory.md b/docs/Set-SnipeItAccessory.md similarity index 97% rename from docs/Set-Accessory.md rename to docs/Set-SnipeItAccessory.md index 1a6353e..0915aae 100644 --- a/docs/Set-Accessory.md +++ b/docs/Set-SnipeItAccessory.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-Accessory +# Set-SnipeItAccessory ## SYNOPSIS Updates accessory on Snipe-It system @@ -13,7 +13,7 @@ Updates accessory on Snipe-It system ## SYNTAX ``` -Set-Accessory [-id] [[-name] ] [[-qty] ] [[-category_id] ] +Set-SnipeItAccessory [-id] [[-name] ] [[-qty] ] [[-category_id] ] [[-company_id] ] [[-manufacturer_id] ] [[-order_number] ] [[-purchase_cost] ] [[-purchase_date] ] [[-min_qty] ] [[-supplier_id] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] diff --git a/docs/Set-Asset.md b/docs/Set-SnipeItAsset.md similarity index 98% rename from docs/Set-Asset.md rename to docs/Set-SnipeItAsset.md index 056d650..ab0765b 100644 --- a/docs/Set-Asset.md +++ b/docs/Set-SnipeItAsset.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-Asset +# Set-SnipeItAsset ## SYNOPSIS Update a specific Asset in the Snipe-it asset system @@ -13,7 +13,7 @@ Update a specific Asset in the Snipe-it asset system ## SYNTAX ``` -Set-Asset [-id] [[-Name] ] [[-Status_id] ] [[-Model_id] ] +Set-SnipeItAsset [-id] [[-Name] ] [[-Status_id] ] [[-Model_id] ] [[-last_checkout] ] [[-assigned_to] ] [[-company_id] ] [[-serial] ] [[-order_number] ] [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] [[-requestable] ] [[-archived] ] [[-rtd_location_id] ] diff --git a/docs/Set-AssetOwner.md b/docs/Set-SnipeItAssetOwner.md similarity index 96% rename from docs/Set-AssetOwner.md rename to docs/Set-SnipeItAssetOwner.md index a67e54a..e7a75c8 100644 --- a/docs/Set-AssetOwner.md +++ b/docs/Set-SnipeItAssetOwner.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-AssetOwner +# Set-SnipeItAssetOwner ## SYNOPSIS Checkout asset @@ -13,7 +13,7 @@ Checkout asset ## SYNTAX ``` -Set-AssetOwner [-id] [-assigned_id] [[-checkout_to_type] ] [[-name] ] +Set-SnipeItAssetOwner [-id] [-assigned_id] [[-checkout_to_type] ] [[-name] ] [[-note] ] [[-expected_checkin] ] [[-checkout_at] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/Set-Component.md b/docs/Set-SnipeItComponent.md similarity index 96% rename from docs/Set-Component.md rename to docs/Set-SnipeItComponent.md index 21ec356..f48c027 100644 --- a/docs/Set-Component.md +++ b/docs/Set-SnipeItComponent.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-Component +# Set-SnipeItComponent ## SYNOPSIS Updates component @@ -13,7 +13,7 @@ Updates component ## SYNTAX ``` -Set-Component [-id] [-qty] [[-name] ] [[-company_id] ] +Set-SnipeItComponent [-id] [-qty] [[-name] ] [[-company_id] ] [[-location_id] ] [[-purchase_date] ] [[-purchase_cost] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/Set-Info.md b/docs/Set-SnipeItInfo.md similarity index 92% rename from docs/Set-Info.md rename to docs/Set-SnipeItInfo.md index 514c5dd..bcf16b2 100644 --- a/docs/Set-Info.md +++ b/docs/Set-SnipeItInfo.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-Info +# Set-SnipeItInfo ## SYNOPSIS Sets authetication information @@ -13,7 +13,7 @@ Sets authetication information ## SYNTAX ``` -Set-Info [[-url] ] [[-apiKey] ] [] +Set-SnipeItInfo [[-url] ] [[-apiKey] ] [] ``` ## DESCRIPTION diff --git a/docs/Set-License.md b/docs/Set-SnipeItLicense.md similarity index 97% rename from docs/Set-License.md rename to docs/Set-SnipeItLicense.md index 95fc2a2..5afe0a1 100644 --- a/docs/Set-License.md +++ b/docs/Set-SnipeItLicense.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-License +# Set-SnipeItLicense ## SYNOPSIS Updates a licence @@ -13,7 +13,7 @@ Updates a licence ## SYNTAX ``` -Set-License [-id] [[-name] ] [[-seats] ] [[-category_id] ] +Set-SnipeItLicense [-id] [[-name] ] [[-seats] ] [[-category_id] ] [[-company_id] ] [[-expiration_date] ] [[-license_email] ] [[-license_name] ] [[-maintained] ] [[-manufacturer_id] ] [[-notes] ] [[-order_number] ] [[-purchase_cost] ] [[-purchase_date] ] diff --git a/docs/Set-Model.md b/docs/Set-SnipeItModel.md similarity index 96% rename from docs/Set-Model.md rename to docs/Set-SnipeItModel.md index 2e9df08..5475fe1 100644 --- a/docs/Set-Model.md +++ b/docs/Set-SnipeItModel.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-Model +# Set-SnipeItModel ## SYNOPSIS Updates Model on Snipe-it asset system @@ -13,7 +13,7 @@ Updates Model on Snipe-it asset system ## SYNTAX ``` -Set-Model [-id] [[-name] ] [[-model_number] ] [[-category_id] ] +Set-SnipeItModel [-id] [[-name] ] [[-model_number] ] [[-category_id] ] [[-manufacturer_id] ] [[-eol] ] [[-custom_fieldset_id] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` diff --git a/docs/Set-User.md b/docs/Set-SnipeItUser.md similarity index 97% rename from docs/Set-User.md rename to docs/Set-SnipeItUser.md index edc4d23..799c740 100644 --- a/docs/Set-User.md +++ b/docs/Set-SnipeItUser.md @@ -1,11 +1,11 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: schema: 2.0.0 --- -# Set-User +# Set-SnipeItUser ## SYNOPSIS Creates a new user @@ -13,7 +13,7 @@ Creates a new user ## SYNTAX ``` -Set-User [-id] [[-first_name] ] [[-last_name] ] [[-userName] ] +Set-SnipeItUser [-id] [[-first_name] ] [[-last_name] ] [[-userName] ] [[-jobtitle] ] [[-email] ] [[-phone] ] [[-company_id] ] [[-location_id] ] [[-department_id] ] [[-manager_id] ] [[-employee_num] ] [[-activated] ] [[-notes] ] [-url] [-apiKey] [-WhatIf] [-Confirm] diff --git a/docs/Set-SnipeitLocation.md b/docs/Set-SnipeitLocation.md deleted file mode 100644 index b06b2f4..0000000 --- a/docs/Set-SnipeitLocation.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -external help file: SnipeItPS-help.xml -Module Name: SnipeitPS -online version: -schema: 2.0.0 ---- - -# Set-SnipeitLocation - -## SYNOPSIS -Updates Location in Snipe-it asset system - -## SYNTAX - -``` -Set-SnipeitLocation [-id] [[-name] ] [[-address] ] [[-address2] ] - [[-state] ] [[-country] ] [[-zip] ] [[-manager_id] ] [[-ldap_ou] ] - [[-parent_id] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Long description - -## EXAMPLES - -### EXAMPLE 1 -``` -Set-SnipeitLocation -id 123 -name "Some storage" -parent_id 100 -``` - -## PARAMETERS - -### -address -Address line 1 - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -address2 -Address line 2 - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 12 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -country -Address Contry - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -id -{{ Fill id Description }} - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ldap_ou -LDAP OU of Location - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 9 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -manager_id -Location manager as id - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -name -Name of Location - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -parent_id -Parent location as id - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 10 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -state -Address State - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -url -URL of Snipeit system, can be set using Set-Info command - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 11 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -zip -Address zipcode - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS diff --git a/docs/SnipeItPS.md b/docs/SnipeItPS.md index aa150e7..2453f0c 100644 --- a/docs/SnipeItPS.md +++ b/docs/SnipeItPS.md @@ -1,115 +1,109 @@ --- Module Name: SnipeitPS -Module Guid: {{ Update Module Guid }} +Module Guid: f86f4db4-1cb1-45c4-b7bf-6762531bfdeb Download Help Link: {{ Update Download Link }} -Help Version: {{ Update Help Version }} -Locale: {{ Update Locale }} +Help Version: {{ Please enter version of help manually (X.X.X.X) format }} +Locale: en-US --- # SnipeitPS Module ## Description -{{ Fill in the Description }} +Powershell API for SnipeIt Asset Management ## SnipeitPS Cmdlets -### [Get-Accessory](Get-Accessory.md) +### [Get-SnipeItAccessory](Get-SnipeItAccessory.md) Gets a list of Snipe-it Accessories -### [Get-Asset](Get-Asset.md) +### [Get-SnipeItAsset](Get-SnipeItAsset.md) Gets a list of Snipe-it Assets or specific asset -### [Get-AssetMaintenance](Get-AssetMaintenance.md) +### [Get-SnipeItAssetMaintenance](Get-SnipeItAssetMaintenance.md) Lists Snipe-it Assets Maintenances -### [Get-Category](Get-Category.md) +### [Get-SnipeItCategory](Get-SnipeItCategory.md) Gets a list of Snipe-it Categories -### [Get-Company](Get-Company.md) +### [Get-SnipeItCompany](Get-SnipeItCompany.md) Gets a list of Snipe-it Companies -### [Get-Component](Get-Component.md) +### [Get-SnipeItComponent](Get-SnipeItComponent.md) Gets a list of Snipe-it Components -### [Get-CustomField](Get-CustomField.md) -Returns a list of all Snipe-IT custom fields +### [Get-SnipeItCustomField](Get-SnipeItCustomField.md) +Returns specific Snipe-IT custom field or a list of all custom field -### [Get-Department](Get-Department.md) +### [Get-SnipeItDepartment](Get-SnipeItDepartment.md) Gets a list of Snipe-it Departments -### [Get-Fieldset](Get-Fieldset.md) -Gets a list of Snipe-it Fieldsets +### [Get-SnipeItFieldset](Get-SnipeItFieldset.md) +Returns a fieldset or list of Snipe-it Fieldsets -### [Get-Model](Get-Model.md) +### [Get-SnipeItModel](Get-SnipeItModel.md) Gets a list of Snipe-it Models -### [Get-SnipeitLocation](Get-SnipeitLocation.md) -Gets a list of Snipe-it Locations - -### [Get-Status](Get-Status.md) +### [Get-SnipeItStatus](Get-SnipeItStatus.md) Gets a list of Snipe-it Status Labels -### [New-Asset](New-Asset.md) +### [New-SnipeItAsset](New-SnipeItAsset.md) Add a new Asset to Snipe-it asset system -### [New-AssetMaintenance](New-AssetMaintenance.md) +### [New-SnipeItAssetMaintenance](New-SnipeItAssetMaintenance.md) Add a new Asset maintenence to Snipe-it asset system -### [New-Category](New-Category.md) +### [New-SnipeItCategory](New-SnipeItCategory.md) Create a new Snipe-IT Category -### [New-Component](New-Component.md) +### [New-SnipeItComponent](New-SnipeItComponent.md) Create a new component -### [New-CustomField](New-CustomField.md) +### [New-SnipeItCustomField](New-SnipeItCustomField.md) Add a new Custom Field to Snipe-it asset system -### [New-Department](New-Department.md) +### [New-SnipeItDepartment](New-SnipeItDepartment.md) Creates a department -### [New-License](New-License.md) +### [New-SnipeItLicense](New-SnipeItLicense.md) Creates a licence -### [New-Location](New-Location.md) +### [New-SnipeItLocation](New-SnipeItLocation.md) Add a new Location to Snipe-it asset system -### [New-Manufacturer](New-Manufacturer.md) +### [New-SnipeItManufacturer](New-SnipeItManufacturer.md) Add a new Manufacturer to Snipe-it asset system -### [New-Model](New-Model.md) +### [New-SnipeItModel](New-SnipeItModel.md) Add a new Model to Snipe-it asset system -### [New-User](New-User.md) +### [New-SnipeItUser](New-SnipeItUser.md) Creates a new user -### [Remove-Asset](Remove-Asset.md) +### [Remove-SnipeItAsset](Remove-SnipeItAsset.md) Removes Asset to Snipe-it asset system -### [Remove-User](Remove-User.md) +### [Remove-SnipeItUser](Remove-SnipeItUser.md) Removes User from Snipe-it asset system -### [Set-Accessory](Set-Accessory.md) +### [Set-SnipeItAccessory](Set-SnipeItAccessory.md) Updates accessory on Snipe-It system -### [Set-Asset](Set-Asset.md) +### [Set-SnipeItAsset](Set-SnipeItAsset.md) Update a specific Asset in the Snipe-it asset system -### [Set-AssetOwner](Set-AssetOwner.md) +### [Set-SnipeItAssetOwner](Set-SnipeItAssetOwner.md) Checkout asset -### [Set-Component](Set-Component.md) +### [Set-SnipeItComponent](Set-SnipeItComponent.md) Updates component -### [Set-Info](Set-Info.md) +### [Set-SnipeItInfo](Set-SnipeItInfo.md) Sets authetication information -### [Set-License](Set-License.md) +### [Set-SnipeItLicense](Set-SnipeItLicense.md) Updates a licence -### [Set-Model](Set-Model.md) +### [Set-SnipeItModel](Set-SnipeItModel.md) Updates Model on Snipe-it asset system -### [Set-SnipeitLocation](Set-SnipeitLocation.md) -Updates Location in Snipe-it asset system - -### [Set-User](Set-User.md) +### [Set-SnipeItUser](Set-SnipeItUser.md) Creates a new user From 5bc402b84762570c234844e8b57b02adced9dbea Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sat, 22 May 2021 18:50:56 +0300 Subject: [PATCH 03/17] Prefixed all commands and added aliases --- SnipeitPS/SnipeItPS.psd1 | Bin 11972 -> 11958 bytes docs/Get-SnipeItManufacturer.md | 4 +- docs/Get-SnipeItSupplier.md | 4 +- docs/Get-SnipeItUser.md | 4 +- docs/Set-SnipeitLocation.md | 253 ++++++++++++++++++++++++++++++++ 5 files changed, 259 insertions(+), 6 deletions(-) create mode 100644 docs/Set-SnipeitLocation.md diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 7cbd08dc27a3908d55e73ee2840be5c0cdeb06b3..5fc4ea59f7c22994bc772091cae4297a6b3183fe 100644 GIT binary patch delta 16 YcmX>SyDfIZEUC$65?Y%tNqrIq072acNB{r; delta 16 YcmdlMdn9(lEUC#0L@YKRk@_SI07Vf8t^fc4 diff --git a/docs/Get-SnipeItManufacturer.md b/docs/Get-SnipeItManufacturer.md index f9c233f..e3a775f 100644 --- a/docs/Get-SnipeItManufacturer.md +++ b/docs/Get-SnipeItManufacturer.md @@ -54,7 +54,7 @@ Accept wildcard characters: False ``` ### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -146,7 +146,7 @@ Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String diff --git a/docs/Get-SnipeItSupplier.md b/docs/Get-SnipeItSupplier.md index cefdd7c..5df5f74 100644 --- a/docs/Get-SnipeItSupplier.md +++ b/docs/Get-SnipeItSupplier.md @@ -50,7 +50,7 @@ Accept wildcard characters: False ``` ### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -142,7 +142,7 @@ Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String diff --git a/docs/Get-SnipeItUser.md b/docs/Get-SnipeItUser.md index 7b48f8f..e7e1410 100644 --- a/docs/Get-SnipeItUser.md +++ b/docs/Get-SnipeItUser.md @@ -62,7 +62,7 @@ Accept wildcard characters: False ``` ### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -229,7 +229,7 @@ Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String diff --git a/docs/Set-SnipeitLocation.md b/docs/Set-SnipeitLocation.md new file mode 100644 index 0000000..792cc2a --- /dev/null +++ b/docs/Set-SnipeitLocation.md @@ -0,0 +1,253 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Set-SnipeitLocation + +## SYNOPSIS +Updates Location in Snipe-it asset system + +## SYNTAX + +``` +Set-SnipeitLocation [-id] [[-name] ] [[-address] ] [[-address2] ] + [[-state] ] [[-country] ] [[-zip] ] [[-manager_id] ] [[-ldap_ou] ] + [[-parent_id] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Long description + +## EXAMPLES + +### EXAMPLE 1 +``` +Set-SnipeitLocation -id 123 -name "Some storage" -parent_id 100 +``` + +## PARAMETERS + +### -address +Address line 1 + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -address2 +Address line 2 + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 12 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -country +Address Contry + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +{{ Fill id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ldap_ou +LDAP OU of Location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -manager_id +Location manager as id + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +Name of Location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -parent_id +Parent location as id + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -state +Address State + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 11 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -zip +Address zipcode + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS From fe39b3cb328136ad9a9e6ede5d24df67a98ce30a Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sat, 22 May 2021 18:54:07 +0300 Subject: [PATCH 04/17] Prefixed all commands and added aliases --- SnipeitPS/SnipeItPS.psd1 | Bin 11958 -> 11888 bytes docs/Get-SnipeitLocation.md | 168 ++++++++++++++++++++++++++++++++++++ docs/SnipeItPS.md | 3 + 3 files changed, 171 insertions(+) create mode 100644 docs/Get-SnipeitLocation.md diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 5fc4ea59f7c22994bc772091cae4297a6b3183fe..0ae11cd89ec991b4a6a172860b6ddff9d65ab463 100644 GIT binary patch delta 21 dcmdlM`ypn-9FfhdL^K2@7btOT7E)cp2>@y@2rU2r delta 36 ucmV+<0NelYT((`XoD`Fg69lu86fzK#FeC_)8w!)`ASRRkAqun3B%%ory$%cj diff --git a/docs/Get-SnipeitLocation.md b/docs/Get-SnipeitLocation.md new file mode 100644 index 0000000..fbf0088 --- /dev/null +++ b/docs/Get-SnipeitLocation.md @@ -0,0 +1,168 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Get-SnipeitLocation + +## SYNOPSIS +Gets a list of Snipe-it Locations + +## SYNTAX + +``` +Get-SnipeitLocation [[-search] ] [[-id] ] [[-order] ] [[-limit] ] + [[-offset] ] [-all] [-url] [-apiKey] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-Location -search Location1 +``` + +### EXAMPLE 2 +``` +Get-Location -id 3 +``` + +## PARAMETERS + +### -all +A return all results, works with -offset and other parameters + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +A id of specific Location + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 50 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -offset +Offset to use + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -order +{{ Fill order Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: Desc +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -search +A text string to search the Locations data + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/SnipeItPS.md b/docs/SnipeItPS.md index 2453f0c..7f94ac4 100644 --- a/docs/SnipeItPS.md +++ b/docs/SnipeItPS.md @@ -101,6 +101,9 @@ Sets authetication information ### [Set-SnipeItLicense](Set-SnipeItLicense.md) Updates a licence +### [Set-SnipeitLocation](Set-SnipeitLocation.md) +Updates Location in Snipe-it asset system + ### [Set-SnipeItModel](Set-SnipeItModel.md) Updates Model on Snipe-it asset system From 46aa80b16f6bf76d3602095f1ab52151559a243b Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sat, 22 May 2021 19:03:32 +0300 Subject: [PATCH 05/17] Prefixed all commands and added aliases --- SnipeitPS/Public/Set-SnipeItInfo.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SnipeitPS/Public/Set-SnipeItInfo.ps1 b/SnipeitPS/Public/Set-SnipeItInfo.ps1 index 1283fa7..5e66d4f 100644 --- a/SnipeitPS/Public/Set-SnipeItInfo.ps1 +++ b/SnipeitPS/Public/Set-SnipeItInfo.ps1 @@ -46,7 +46,7 @@ function Set-SnipeItInfo { } } - $moduleCommands = Get-Command -Module SnipeitPS + $moduleCommands = Get-Command -Module SnipeitPS -CommandType Function } PROCESS { From ccbe86c2c953a68d5e7b5869222fe1aee650e10c Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sat, 22 May 2021 21:36:23 +0300 Subject: [PATCH 06/17] Added startup notification about new prefix and aliases --- SnipeitPS/Private/Set-SnipeItAlias.ps1 | 53 ++++++++++++++++++++++++++ SnipeitPS/SnipeItPS.psm1 | 37 +----------------- 2 files changed, 54 insertions(+), 36 deletions(-) create mode 100644 SnipeitPS/Private/Set-SnipeItAlias.ps1 diff --git a/SnipeitPS/Private/Set-SnipeItAlias.ps1 b/SnipeitPS/Private/Set-SnipeItAlias.ps1 new file mode 100644 index 0000000..26cc63d --- /dev/null +++ b/SnipeitPS/Private/Set-SnipeItAlias.ps1 @@ -0,0 +1,53 @@ +function Set-SnipeItAlias() +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Low" + )] + param() + Write-Verbose "Setting compatibility aliases.. " + $aliases= @{'Get-Asset' = 'Get-SnipeItAsset'; + 'Get-AssetMaintenance' = 'Get-SnipeItAssetMaintenance'; + 'Get-Category' = 'Get-SnipeItCategory'; + 'Get-Company' = 'Get-SnipeItCompany'; + 'Get-Component' = 'Get-SnipeItCompany'; + 'Get-CustomField' = 'Get-SnipeItCustomField'; + 'Get-Department' = 'Get-SnipeItDepartment'; + 'Get-Fieldset' = 'Get-SnipeItFieldset'; + 'Get-Manufacturer' = 'Get-SnipeItManufacturer'; + 'Get-Model' = 'Get-SnipeItModel'; + 'Get-Status' = 'Get-SnipeItStatus'; + 'Get-Supplier' = 'Get-SnipeItSupplier'; + 'Get-User' = 'Get-SnipeItUser'; + 'New-Asset' = 'New-SnipeItAsset'; + 'New-AssetMaintenance' = 'New-SnipeItAssetMaintenance'; + 'New-Category' = 'New-SnipeItCategory'; + 'New-Component' = 'New-SnipeItComponent'; + 'New-CustomField' = 'New-SnipeItCustomField'; + 'New-Department' = 'New-SnipeItDepartment'; + 'New-License' = 'New-SnipeItLicense'; + 'Set-License' = 'Set-SnipeItLicense'; + 'New-Location' = 'New-SnipeItLocation'; + 'New-Manufacturer' = 'New-SnipeItManufacturer'; + 'New-Model' = 'New-SnipeItModel'; + 'New-User' = 'New-SnipeItUser'; + 'Set-Asset' = 'Set-SnipeItAsset'; + 'Set-AssetOwner' = 'Set-SnipeItAssetOwner'; + 'Set-Component' = 'Set-SnipeItComponent'; + 'Set-Model' = 'Set-SnipeItModel'; + 'Set-Info' = 'Set-SnipeItInfo'; + 'Set-User' = 'Set-SnipeItUser'; + 'New-Accessory' = 'New-SnipeItAccessory'; + 'Set-Accessory' = 'Set-SnipeItAccessory'; + 'Get-Accessory' = 'Get-SnipeItAccessory'; + 'Remove-Asset' = 'Remove-SnipeItAsset'; + 'Remove-User' = 'Remove-SnipeItUser';} + Write-Verbose "All aliases are deprediated." + ForEach ($key in $aliases.Keys ) { + New-Alias -Name $key -Value $($aliases[$key]) -Scope 1 + Write-Verbose ("{0,5} -> {1}" -f $key,$($aliases[$key])) + } + Write-Verbose "Please start using native 'SnipeIt' prfixed functions instead." + Get-Command -Module SnipeItPS -CommandType Alias | Select-Object -Property DisplayName,ResolvedCommand + +} diff --git a/SnipeitPS/SnipeItPS.psm1 b/SnipeitPS/SnipeItPS.psm1 index 1fddf30..bf244b7 100644 --- a/SnipeitPS/SnipeItPS.psm1 +++ b/SnipeitPS/SnipeItPS.psm1 @@ -15,39 +15,4 @@ Get-ChildItem $scriptRoot *.ps1 | ForEach-Object { } #Create unprefixed aliases -Set-Alias -Name Get-Asset -Value Get-SnipeItAsset -Set-Alias -Name Get-AssetMaintenance -Value Get-SnipeItAssetMaintenance -Set-Alias -Name Get-Category -Value Get-SnipeItCategory -Set-Alias -Name Get-Company -Value Get-SnipeItCompany -Set-Alias -Name Get-Component -Value Get-SnipeItCompany -Set-Alias -Name Get-CustomField -Value Get-SnipeItCustomField -Set-Alias -Name Get-Department -Value Get-SnipeItDepartment -Set-Alias -Name Get-Fieldset -Value Get-SnipeItFieldset -Set-Alias -Name Get-Manufacturer -Value Get-SnipeItManufacturer -Set-Alias -Name Get-Model -Value Get-SnipeItModel -Set-Alias -Name Get-Status -Value Get-SnipeItStatus -Set-Alias -Name Get-Supplier -Value Get-SnipeItSupplier -Set-Alias -Name Get-User -Value Get-SnipeItUser -Set-Alias -Name New-Asset -Value New-SnipeItAsset -Set-Alias -Name New-AssetMaintenance -Value New-SnipeItAssetMaintenance -Set-Alias -Name New-Category -Value New-SnipeItCategory -Set-Alias -Name New-Component -Value New-SnipeItComponent -Set-Alias -Name New-CustomField -Value New-SnipeItCustomField -Set-Alias -Name New-Department -Value New-SnipeItDepartment -Set-Alias -Name New-License -Value New-SnipeItLicense -Set-Alias -Name Set-License -Value Set-SnipeItLicense -Set-Alias -Name New-Location -Value New-SnipeItLocation -Set-Alias -Name New-Manufacturer -Value New-Manufacturer -Set-Alias -Name New-Model -Value New-SnipeItModel -Set-Alias -Name New-User -Value New-SnipeItUser -Set-Alias -Name Set-Asset -Value Set-SnipeItAsset -Set-Alias -Name Set-AssetOwner -Value Set-SnipeItAssetOwner -Set-Alias -Name Set-Component -Value Set-SnipeItComponent -Set-Alias -Name Set-Model -Value Set-SnipeItModel -Set-Alias -Name Set-Info -Value Set-SnipeItInfo -Set-Alias -Name Set-User -Value Set-SnipeItUser -Set-Alias -Name New-Accessory -Value New-SnipeItAccessory -Set-Alias -Name Set-Accessory -Value Set-SnipeItAccessory -Set-Alias -Name Get-Accessory -Value Get-SnipeItAccessory -Set-Alias -Name Remove-Asset -Value Remove-SnipeItAsset -Set-Alias -Name Remove-User -Value Remove-SnipeItUser +Set-SnipeItAlias -Verbose From cdc60fbeaa93c25424df52e717139b64e38dcace Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sun, 23 May 2021 19:23:24 +0300 Subject: [PATCH 07/17] alias check for every public function --- SnipeitPS/Private/Test-SnipeItAlias.ps1 | 13 +++++++++++++ SnipeitPS/Public/Get-SnipeItAccessory.ps1 | 1 + SnipeitPS/Public/Get-SnipeItAsset.ps1 | 1 + SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItCategory.ps1 | 1 + SnipeitPS/Public/Get-SnipeItCompany.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItComponent.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItCustomField.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItDepartment.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItFieldset.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItLicense.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItLocation.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItManufacturer.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItModel.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItStatus.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItSupplier.ps1 | 2 ++ SnipeitPS/Public/Get-SnipeItUser.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItAccessory.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItAsset.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItAudit.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItCategory.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItCompany.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItComponent.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItCustomField.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItDepartment.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItLicense.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItLocation.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItManufacturer.ps1 | 1 + SnipeitPS/Public/New-SnipeItModel.ps1 | 2 ++ SnipeitPS/Public/New-SnipeItUser.ps1 | 2 ++ SnipeitPS/Public/Remove-SnipeItAsset.ps1 | 2 ++ SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 | 2 ++ SnipeitPS/Public/Remove-SnipeItUser.ps1 | 2 ++ SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItAccessory.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItAsset.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItComponents.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItInfo.ps1 | 3 ++- SnipeitPS/Public/Set-SnipeItLicense.ps1 | 4 +++- SnipeitPS/Public/Set-SnipeItLocation.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItModel.ps1 | 2 ++ SnipeitPS/Public/Set-SnipeItUser.ps1 | 2 ++ SnipeitPS/SnipeItPS.psm1 | 2 +- 45 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 SnipeitPS/Private/Test-SnipeItAlias.ps1 diff --git a/SnipeitPS/Private/Test-SnipeItAlias.ps1 b/SnipeitPS/Private/Test-SnipeItAlias.ps1 new file mode 100644 index 0000000..2aee0f4 --- /dev/null +++ b/SnipeitPS/Private/Test-SnipeItAlias.ps1 @@ -0,0 +1,13 @@ +function Test-SnipeItAlias() +{ + [CmdletBinding()] + param( + [parameter(mandatory = $true)] + [string]$invocationName, + [parameter(mandatory = $true)] + [string]$commandName + ) + if($invocationName -ne $commandName) { + Write-Warning "$invocationName is still working, but it has been superceded by $commandName, please use it instead." + } +} diff --git a/SnipeitPS/Public/Get-SnipeItAccessory.ps1 b/SnipeitPS/Public/Get-SnipeItAccessory.ps1 index 6002214..e86937b 100644 --- a/SnipeitPS/Public/Get-SnipeItAccessory.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAccessory.ps1 @@ -63,6 +63,7 @@ function Get-SnipeItAccessory() { [parameter(mandatory = $true)] [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters diff --git a/SnipeitPS/Public/Get-SnipeItAsset.ps1 b/SnipeitPS/Public/Get-SnipeItAsset.ps1 index c60e265..c85312d 100644 --- a/SnipeitPS/Public/Get-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAsset.ps1 @@ -118,6 +118,7 @@ function Get-SnipeItAsset() { [parameter(mandatory = $true)] [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters diff --git a/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 index 1a5aa4b..00efc33 100644 --- a/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 @@ -62,6 +62,8 @@ function Get-SnipeItAssetMaintenance() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Parameters = @{ diff --git a/SnipeitPS/Public/Get-SnipeItCategory.ps1 b/SnipeitPS/Public/Get-SnipeItCategory.ps1 index d1fdce0..72d64d8 100644 --- a/SnipeitPS/Public/Get-SnipeItCategory.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCategory.ps1 @@ -53,6 +53,7 @@ function Get-SnipeItCategory() [parameter(mandatory = $true)] [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters diff --git a/SnipeitPS/Public/Get-SnipeItCompany.ps1 b/SnipeitPS/Public/Get-SnipeItCompany.ps1 index 7e9be6c..d105df8 100644 --- a/SnipeitPS/Public/Get-SnipeItCompany.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCompany.ps1 @@ -55,6 +55,8 @@ function Get-SnipeItCompany() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/companies" diff --git a/SnipeitPS/Public/Get-SnipeItComponent.ps1 b/SnipeitPS/Public/Get-SnipeItComponent.ps1 index 3197c94..ef680e8 100644 --- a/SnipeitPS/Public/Get-SnipeItComponent.ps1 +++ b/SnipeitPS/Public/Get-SnipeItComponent.ps1 @@ -68,6 +68,8 @@ function Get-SnipeItComponent() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/components" diff --git a/SnipeitPS/Public/Get-SnipeItCustomField.ps1 b/SnipeitPS/Public/Get-SnipeItCustomField.ps1 index 736eed6..fb4c1d8 100644 --- a/SnipeitPS/Public/Get-SnipeItCustomField.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCustomField.ps1 @@ -28,6 +28,8 @@ function Get-SnipeItCustomField() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + if ($id) { $apiurl= "$url/api/v1/fields/$id" } else { diff --git a/SnipeitPS/Public/Get-SnipeItDepartment.ps1 b/SnipeitPS/Public/Get-SnipeItDepartment.ps1 index 658940e..d9a527b 100644 --- a/SnipeitPS/Public/Get-SnipeItDepartment.ps1 +++ b/SnipeitPS/Public/Get-SnipeItDepartment.ps1 @@ -60,6 +60,8 @@ function Get-SnipeItDepartment() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/departments" diff --git a/SnipeitPS/Public/Get-SnipeItFieldset.ps1 b/SnipeitPS/Public/Get-SnipeItFieldset.ps1 index 429d45f..fcc37c0 100644 --- a/SnipeitPS/Public/Get-SnipeItFieldset.ps1 +++ b/SnipeitPS/Public/Get-SnipeItFieldset.ps1 @@ -30,6 +30,8 @@ function Get-SnipeItFieldset() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + if ($id) { $apiurl = "$url/api/v1/fieldsets/$id" } else { diff --git a/SnipeitPS/Public/Get-SnipeItLicense.ps1 b/SnipeitPS/Public/Get-SnipeItLicense.ps1 index dd1cbee..08d91a0 100644 --- a/SnipeitPS/Public/Get-SnipeItLicense.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLicense.ps1 @@ -79,6 +79,8 @@ function Get-SnipeItLicense() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/licenses" diff --git a/SnipeitPS/Public/Get-SnipeItLocation.ps1 b/SnipeitPS/Public/Get-SnipeItLocation.ps1 index da44f9d..b16e9fc 100644 --- a/SnipeitPS/Public/Get-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLocation.ps1 @@ -54,6 +54,8 @@ function Get-SnipeitLocation() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/locations" diff --git a/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 b/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 index 62127ab..10e57fb 100644 --- a/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 +++ b/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 @@ -56,6 +56,8 @@ function Get-SnipeItManufacturer() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/manufacturers" diff --git a/SnipeitPS/Public/Get-SnipeItModel.ps1 b/SnipeitPS/Public/Get-SnipeItModel.ps1 index 7137778..2ddd9dd 100644 --- a/SnipeitPS/Public/Get-SnipeItModel.ps1 +++ b/SnipeitPS/Public/Get-SnipeItModel.ps1 @@ -54,6 +54,8 @@ function Get-SnipeItModel() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/models" diff --git a/SnipeitPS/Public/Get-SnipeItStatus.ps1 b/SnipeitPS/Public/Get-SnipeItStatus.ps1 index 05027e0..e529b01 100644 --- a/SnipeitPS/Public/Get-SnipeItStatus.ps1 +++ b/SnipeitPS/Public/Get-SnipeItStatus.ps1 @@ -54,6 +54,8 @@ function Get-SnipeItStatus() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/statuslabels" diff --git a/SnipeitPS/Public/Get-SnipeItSupplier.ps1 b/SnipeitPS/Public/Get-SnipeItSupplier.ps1 index 0f96342..a6b2ec5 100644 --- a/SnipeitPS/Public/Get-SnipeItSupplier.ps1 +++ b/SnipeitPS/Public/Get-SnipeItSupplier.ps1 @@ -54,6 +54,8 @@ function Get-SnipeItSupplier() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/suppliers" diff --git a/SnipeitPS/Public/Get-SnipeItUser.ps1 b/SnipeitPS/Public/Get-SnipeItUser.ps1 index 6b1aec3..41b12c2 100644 --- a/SnipeitPS/Public/Get-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Get-SnipeItUser.ps1 @@ -76,6 +76,8 @@ function Get-SnipeItUser() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $apiurl = "$url/api/v1/users" diff --git a/SnipeitPS/Public/New-SnipeItAccessory.ps1 b/SnipeitPS/Public/New-SnipeItAccessory.ps1 index 5d4cbbb..fea6331 100644 --- a/SnipeitPS/Public/New-SnipeItAccessory.ps1 +++ b/SnipeitPS/Public/New-SnipeItAccessory.ps1 @@ -102,6 +102,8 @@ function New-SnipeItAccessory() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['purchase_date']) { diff --git a/SnipeitPS/Public/New-SnipeItAsset.ps1 b/SnipeitPS/Public/New-SnipeItAsset.ps1 index 654c510..198d1e1 100644 --- a/SnipeitPS/Public/New-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/New-SnipeItAsset.ps1 @@ -123,6 +123,8 @@ function New-SnipeItAsset() [hashtable] $customfields ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters diff --git a/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 index c86f200..3d53d54 100644 --- a/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 @@ -77,6 +77,8 @@ function New-SnipeItAssetMaintenance() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['start_date']) { diff --git a/SnipeitPS/Public/New-SnipeItAudit.ps1 b/SnipeitPS/Public/New-SnipeItAudit.ps1 index d3bea0f..21dd686 100644 --- a/SnipeitPS/Public/New-SnipeItAudit.ps1 +++ b/SnipeitPS/Public/New-SnipeItAudit.ps1 @@ -37,6 +37,8 @@ function New-SnipeItAudit() ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ "location_id" = $location_id } diff --git a/SnipeitPS/Public/New-SnipeItCategory.ps1 b/SnipeitPS/Public/New-SnipeItCategory.ps1 index c2e51e4..d692d39 100644 --- a/SnipeitPS/Public/New-SnipeItCategory.ps1 +++ b/SnipeitPS/Public/New-SnipeItCategory.ps1 @@ -55,6 +55,8 @@ function New-SnipeItCategory() [switch]$checkin_email ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ "name" = $name "category_type" = $category_type diff --git a/SnipeitPS/Public/New-SnipeItCompany.ps1 b/SnipeitPS/Public/New-SnipeItCompany.ps1 index 1b80e03..fbfb9f5 100644 --- a/SnipeitPS/Public/New-SnipeItCompany.ps1 +++ b/SnipeitPS/Public/New-SnipeItCompany.ps1 @@ -37,6 +37,8 @@ function New-SnipeItCompany() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/Public/New-SnipeItComponent.ps1 b/SnipeitPS/Public/New-SnipeItComponent.ps1 index 1ea0dbd..a846332 100644 --- a/SnipeitPS/Public/New-SnipeItComponent.ps1 +++ b/SnipeitPS/Public/New-SnipeItComponent.ps1 @@ -67,6 +67,8 @@ function New-SnipeItComponent() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['purchase_date']) { diff --git a/SnipeitPS/Public/New-SnipeItCustomField.ps1 b/SnipeitPS/Public/New-SnipeItCustomField.ps1 index 1fba1cc..219d014 100644 --- a/SnipeitPS/Public/New-SnipeItCustomField.ps1 +++ b/SnipeitPS/Public/New-SnipeItCustomField.ps1 @@ -46,6 +46,8 @@ function New-SnipeItCustomField() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters #Convert Values to JSON format diff --git a/SnipeitPS/Public/New-SnipeItDepartment.ps1 b/SnipeitPS/Public/New-SnipeItDepartment.ps1 index ac5ce33..c51d094 100644 --- a/SnipeitPS/Public/New-SnipeItDepartment.ps1 +++ b/SnipeitPS/Public/New-SnipeItDepartment.ps1 @@ -53,6 +53,8 @@ function New-SnipeItDepartment() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/Public/New-SnipeItLicense.ps1 b/SnipeitPS/Public/New-SnipeItLicense.ps1 index 98b9a3b..b5e4d4a 100644 --- a/SnipeitPS/Public/New-SnipeItLicense.ps1 +++ b/SnipeitPS/Public/New-SnipeItLicense.ps1 @@ -124,6 +124,8 @@ function New-SnipeItLicense() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['expiration_date']) { diff --git a/SnipeitPS/Public/New-SnipeItLocation.ps1 b/SnipeitPS/Public/New-SnipeItLocation.ps1 index d2c910e..a6dc864 100644 --- a/SnipeitPS/Public/New-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/New-SnipeItLocation.ps1 @@ -78,6 +78,8 @@ function New-SnipeItLocation() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/Public/New-SnipeItManufacturer.ps1 b/SnipeitPS/Public/New-SnipeItManufacturer.ps1 index 55a06e4..bcdbb30 100644 --- a/SnipeitPS/Public/New-SnipeItManufacturer.ps1 +++ b/SnipeitPS/Public/New-SnipeItManufacturer.ps1 @@ -36,6 +36,7 @@ function New-SnipeItManufacturer() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = @{ "name" = $Name diff --git a/SnipeitPS/Public/New-SnipeItModel.ps1 b/SnipeitPS/Public/New-SnipeItModel.ps1 index cc980e1..6fe1119 100644 --- a/SnipeitPS/Public/New-SnipeItModel.ps1 +++ b/SnipeitPS/Public/New-SnipeItModel.ps1 @@ -61,6 +61,8 @@ function New-SnipeItModel() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ name = $name category_id = $category_id diff --git a/SnipeitPS/Public/New-SnipeItUser.ps1 b/SnipeitPS/Public/New-SnipeItUser.ps1 index b5bb851..120b26d 100644 --- a/SnipeitPS/Public/New-SnipeItUser.ps1 +++ b/SnipeitPS/Public/New-SnipeItUser.ps1 @@ -109,6 +109,8 @@ function New-SnipeItUser() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($password ) { diff --git a/SnipeitPS/Public/Remove-SnipeItAsset.ps1 b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 index 90226e1..013147c 100644 --- a/SnipeitPS/Public/Remove-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 @@ -32,6 +32,8 @@ function Remove-SnipeItAsset () ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ "ID" = $Name } diff --git a/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 index 9ae641c..b48afcb 100644 --- a/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 @@ -36,6 +36,8 @@ function Remove-SnipeItAssetMaintenance { $apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ "ID" = $ID } diff --git a/SnipeitPS/Public/Remove-SnipeItUser.ps1 b/SnipeitPS/Public/Remove-SnipeItUser.ps1 index d32e306..b30f550 100644 --- a/SnipeitPS/Public/Remove-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItUser.ps1 @@ -33,6 +33,8 @@ function Remove-SnipeItUser () ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ "ID" = $ID } diff --git a/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 b/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 index fce8338..e4588a7 100644 --- a/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 +++ b/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 @@ -48,6 +48,8 @@ function Reset-SnipeItAssetOwner() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = @{ "notes" = $notes } diff --git a/SnipeitPS/Public/Set-SnipeItAccessory.ps1 b/SnipeitPS/Public/Set-SnipeItAccessory.ps1 index 9e3ec18..b0d619c 100644 --- a/SnipeitPS/Public/Set-SnipeItAccessory.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAccessory.ps1 @@ -99,6 +99,8 @@ function Set-SnipeItAccessory() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['purchase_date']) { diff --git a/SnipeitPS/Public/Set-SnipeItAsset.ps1 b/SnipeitPS/Public/Set-SnipeItAsset.ps1 index 4688bfe..1e73704 100644 --- a/SnipeitPS/Public/Set-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAsset.ps1 @@ -114,6 +114,8 @@ function Set-SnipeItAsset() [hashtable] $customfields ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($model_id) { $Values.Add('model_id',$model_id)} diff --git a/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 b/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 index 5df1044..0c83ecb 100644 --- a/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 @@ -65,6 +65,8 @@ function Set-SnipeItAssetOwner() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($Values['expected_checkin']) { diff --git a/SnipeitPS/Public/Set-SnipeItComponents.ps1 b/SnipeitPS/Public/Set-SnipeItComponents.ps1 index 558d646..03da9ad 100644 --- a/SnipeitPS/Public/Set-SnipeItComponents.ps1 +++ b/SnipeitPS/Public/Set-SnipeItComponents.ps1 @@ -69,6 +69,8 @@ function Set-SnipeItComponent() [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['purchase_date']) { diff --git a/SnipeitPS/Public/Set-SnipeItInfo.ps1 b/SnipeitPS/Public/Set-SnipeItInfo.ps1 index 5e66d4f..33fcf03 100644 --- a/SnipeitPS/Public/Set-SnipeItInfo.ps1 +++ b/SnipeitPS/Public/Set-SnipeItInfo.ps1 @@ -23,7 +23,7 @@ function Set-SnipeItInfo { ) BEGIN { - + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name function Add-DefaultParameter { param( [Parameter(Mandatory = $true)] @@ -43,6 +43,7 @@ function Set-SnipeItInfo { # http://stackoverflow.com/questions/30427110/set-psdefaultparametersvalues-for-use-within-module-scope $PSDefaultParameterValues["${command}:${parameter}"] = $Value $global:PSDefaultParameterValues["${command}:${parameter}"] = $Value + } } diff --git a/SnipeitPS/Public/Set-SnipeItLicense.ps1 b/SnipeitPS/Public/Set-SnipeItLicense.ps1 index 91a6571..0cf0b18 100644 --- a/SnipeitPS/Public/Set-SnipeItLicense.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLicense.ps1 @@ -129,7 +129,9 @@ function Set-SnipeItLicense() { [string]$apiKey ) - $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['expiration_date']) { $values['expiration_date'] = $values['expiration_date'].ToString("yyyy-MM-dd") diff --git a/SnipeitPS/Public/Set-SnipeItLocation.ps1 b/SnipeitPS/Public/Set-SnipeItLocation.ps1 index 1c4687e..bc3b2f8 100644 --- a/SnipeitPS/Public/Set-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLocation.ps1 @@ -82,6 +82,8 @@ function Set-SnipeitLocation() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/Public/Set-SnipeItModel.ps1 b/SnipeitPS/Public/Set-SnipeItModel.ps1 index 5da86eb..ad07e57 100644 --- a/SnipeitPS/Public/Set-SnipeItModel.ps1 +++ b/SnipeitPS/Public/Set-SnipeItModel.ps1 @@ -66,6 +66,8 @@ function Set-SnipeItModel() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/Public/Set-SnipeItUser.ps1 b/SnipeitPS/Public/Set-SnipeItUser.ps1 index cb8e5bd..6486af3 100644 --- a/SnipeitPS/Public/Set-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Set-SnipeItUser.ps1 @@ -104,6 +104,8 @@ function Set-SnipeItUser() { [string]$apiKey ) + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/SnipeItPS.psm1 b/SnipeitPS/SnipeItPS.psm1 index bf244b7..783e814 100644 --- a/SnipeitPS/SnipeItPS.psm1 +++ b/SnipeitPS/SnipeItPS.psm1 @@ -15,4 +15,4 @@ Get-ChildItem $scriptRoot *.ps1 | ForEach-Object { } #Create unprefixed aliases -Set-SnipeItAlias -Verbose +Set-SnipeItAlias From e80c6be8f9c686e92b072d3668bf3252780c4f86 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sun, 23 May 2021 22:01:40 +0300 Subject: [PATCH 08/17] export get-snipeiticense --- SnipeitPS/SnipeItPS.psd1 | Bin 11888 -> 11990 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 0ae11cd89ec991b4a6a172860b6ddff9d65ab463..12b8092296b05fc126c1a6b945188d56ed484cab 100644 GIT binary patch delta 54 zcmewmb1im*ki_H-LSmEGh-*v|6Pw&4r3IoMh!_E>%^M_oxF&B<;F$bHNn!FoMUKrb H$~xQtK|T}d delta 21 dcmcZ>`ypn7ki_Ny2`%o)3zRrEuTs|G1^{B&2fhFR From 9dece1ceffa67e98cf046c9600d314c3052c1f25 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sun, 23 May 2021 22:10:04 +0300 Subject: [PATCH 09/17] export get-snipeiticense --- SnipeitPS/SnipeItPS.psd1 | Bin 11990 -> 5791 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 12b8092296b05fc126c1a6b945188d56ed484cab..bc3f7f81e30e6bc54a5b9a8fc20cf46eef210f6c 100644 GIT binary patch literal 5791 zcmc&&UvJ|!5`WjHAdm;|9ujZeX0t_s0yUD&Hb9aFankmcmS~%|5~-3@yvCv5{eCl& zWlENU-2?7UZ<-m-4Cg=RBsmdxHmhpBxwW_kTj;{8w_?YPc9v zy6PtllrG)1J)dD+%}(Ili!#~q@rK}D7K)U4HlK~%n&xb|b9%iA!Ux#Bz#TXcYRj|n zl1sa%!QnUQTS1QPN5NFg^IR}1FP!qqy{K%;GOmiQ8>d&?lGNLPtiMi9M zv)-4|E4fiUv;=V%Duu&qlMS;l5rCC>Szi<`u5Rv}o^7irVe_Lh9=&SkQY^qSmoRBWv zz!qt!9MrkDMxBa3f4n#q^CG)AAJq+(XnD+I7RZ6xWt^8Dxgt?eD+JgQ1}~aArVYvx z8D^c^rObsgFWOndsa-k^y@0Q&wOMx(?nFE`DNxr-e<*pBVZ}1nswXzLk}~(J8Ap8D za@w>8Y5`unnU;R`w!WK$-QZ544PPjgd9K{Vf5Vk1tZMfD$u?F!T)yi1pqttqajJg+cp<4~ix%nqpM{3SX*JuQc$m z;-Q1St2wnsft~J|&0a$5o$IDn!|_(AFBD~B6}DorCyHGf?ox8ZS#l}nkKE5 zPxfQ2BV8a7%{Td^!dcTTxLHh2$8mQOIiw6-VT9}wy>e~cZVXM+gLw^$T42K1X=Jo5 zuC>au5sE8SN*5@jM+o>ZTH+vDhg+LsxUpsseG||}tCi%k<;F-XTsMMSV3Mf(7!vaq zs>m4MXABPU$$PaObz2`d;Jj30JPL^14`h~QSI%J@!LEe?@6fQ{mI z02^~2@M(k|^Jz@d_i2Rd`z2EPD4qJa-?n%?#7>O}Xf!=Cd4xwb>c&}wyD=*}!uAz) zhhl%8Wo?wDb@T2dZzOa+gpZswh<{XteNn9l8dhV)yJ*%u;djPmk)b|Db?*OLc+7?|LXDoY1hFp+f`?pG#W;#Hyww&O`I18 zz;TgcT(2_Kuud0gL2DZ_R4A_WpeH$^XS3j8R<*`AC_Shf5h$|;+)-RU~>@cUZQDJ0)SQu&3uTe~N1f**p0h?0QQMZA$b&Fndi%Yz` zysaFn=__+1k^1y;Pua;Nu7I~1BP9k}O#bbBTgvn^9(ox@%63OoZz}dnEk4x_urZH% zCV!2?HJ$_A^AAqHVBQm%43h3rO3!zqskLCiUpr(s59Io;7F|_ckE<`8h^=%sNI7cj!IX=G01mVVBTW1rIg6wfQxLVC%p6 urs6k*g2UpD{h4)nRG#d1!%GP&f3#{odtm;&>Zz$w&qzuQZ`AoaN&XGn5iQ#Q literal 11990 zcmeI2TTdHD6vyYeQon;G9w1e2BxzGssuToCgG4TZkoFa9pfq5+HiSe~zIxmLZw@E3 zU0voHyxa2d|Rk?zjJK^TYAaICv|xX_bh zy`RN5MYz?l7vZLY+ZNnQ-LGEbbj&~L-B{n5a9-#-5|+d8KK!8TUVJhQzeX6SI1mkE z!2oXWV|w`0*W z6Rk+3$oH|{nWPRRpSj)*^(66krMnApHHg2bf+)-McBE%lV<&>j<^QAL>t*XaypB?u zYcAw4(Dzbw9>%8wJv&~QKXG7l7w25WWfZK3+mfYe)Mwq(EK_}ulIs(_KbF?u+Nhad z%YP6y1$i!bq;o3jkXse}ATZ~nuoiA)n%WLqdVVPxn(bT&ANSbj@46ldBN{r5Rx^&X z9LFbUz-6C!hmW7azU&pe#^-VPK71#6JrIsV{oWGSL;YLVzX!6dVSIKdt2z|aEx|t2 z_nzL|7Yxs^*uw=$ZHPK(Fnem!2Q=l-ZUIQR&OdU!Bsq^G_crTWjmMw5(U9YKE}flg zyh~|cnBM3+30L|p&py?>_|%DbCT0*h%qPHtW>Orf*9|l*Vlrv0Ne?%K!#%t$e%u!9 zhOFaE*F+b-I1@eC(<~sLk*qxDW-Go=5yCwz=@6+LM=KnPFMEHWneYItaVp#sVK=Mv zn3u_qpjkDTjgq86_@ z7hmVXifov#n){z4G?sNGn1LwaA0ze(6r%T&2#LgyJ3f0F|8OM+7vP2mF&~<0$z&6x>aK9L|n27HvLw!;nP^ES3pEAAgU~LpqxTvc_S=D zv4QT2S&^(f7RLAD$@A%!o?VDTytK^U=aa0{J=A>X`dH0yCJyn?OI?W!$dlYkOtaX( zrVPFlc4OpClHy;R|Ni@AZJczG=}XChst#>piPXN-g2QM#*a&g|QcsZCn)HV}kHSse z{SvDQ{%uHxBUK6ymXMy?N12k1S~{v@Ny;p7A2P6Ur%VBO=GN8~4Lvb?tob3VShE6suMEfY)-h z=oybX7|%t2O+3TRfplcn{3YnFrl^|wyesi80}j>{F{a{WJz7%IAvT%379G+FxVDB- zPgLA9Wk&FP35}&#R-}KfI6G04Ec#KM)?O(h(nAtut+UE`eka>HyXKtg-|RKl-Bpas zaNpn7eEvQ(KZ*8Dr;G>vGjtbe=tKLWFO_|iXon7nX~YQgkD{OQHm|CRZ>j##D19-q zvGHb|yBfFH^WMoi;Iid-R3J|}J&Rma`_z+|&r+2R-Nx@xc=s{hp+PK_x)<*$_l?AJ zuK}<>i=6N{yMAt~CgcoYsf>{yoO=H{P=$rp3#4wbpJvkR)`RxpggSgj8o*DyzwR@BTcfPwy_9_) zMC-O{jZD~&4~sL%vG2$|Q33sEr2kl3XR|7%Kh^u1)AD{Dx5Uz`r9821WM5CL#@F2w z>&BZWcJZY;4E=nm8cRQ4s>ZP+PbQj;qgLx}X-_ca=-PF3b!_fBx{mU$UR*uCzZcix zp$}^I;_8v@o>VRME;+4jDzY%k5(Q)fl?Oz3P$MqM2H$ubnO{>F$|g zLpCs~h5%dL3Hs+O5g6V2w zKC<1$5@cH)pJ?8Uz1D?tV^jB=;Jew5Q_@@sb7I4)?>0EE0NUWvyv;Rq;-|aqIqv!@ zFJY~>73VnF!D7vqq>^CjtJ(zJUcV;TCLWx^x|%d$spryV)n20|Y+Yd84!XeRHCvKp zS>8Eh;)+a?>N&3}wq&)N$}qE-%_s67cDa_%>QZ)rAPz3fH}Yul{Sei|j@B(Stm z!EVZF+?BRf;gPszg~?a6kp(@B-}|a@QD&ceWj^2KJr@P6IioG~K9Fw6`A})A|4_^M zuPr?>+S!lfR10@j*%o!k?p$#X9n85Ea7Ww)(s5o2V{wPNYPa6%uw15zDzk%hYS3%2 zoc1~>hh7n_uSC^J)XIUZbt?LOKZHD0x8LA$#kN?hw^KiyDMlG>CbJiEyxkZyX z8erCO#B?Hh@Fi9iY=_h&;WYa-r@ibK4(C_kH}u_?*YD_>xPyM?Pb*kyFQt07rJf>u zB;nbQJopK<)Gs+rer=`=t2Ie+g6U9F^m8D-o_Kr^9_3o$O_> zuW7zyu^KweHt;T}uisOzr*iumXCL~A=~xe5dlXMT5RHgBX+N;Me@4`GZTJvfbT*dJDV*Owe!ES>|#x Date: Sun, 23 May 2021 22:58:06 +0300 Subject: [PATCH 10/17] get and set licenceseats --- SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 | 97 +++++++++++++++++++++ SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 | 78 +++++++++++++++++ SnipeitPS/SnipeItPS.psd1 | 2 + 3 files changed, 177 insertions(+) create mode 100644 SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 create mode 100644 SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 diff --git a/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 b/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 new file mode 100644 index 0000000..6a91813 --- /dev/null +++ b/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 @@ -0,0 +1,97 @@ +<# +.SYNOPSIS +Gets a list of Snipe-it Licenses Seats or specific Seat + +.PARAMETER search +A text string to search the Licenses data + +.PARAMETER id +A id of specific License + +.PARAMETER seat_id +A id of specific seat + +.PARAMETER limit +Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all + +.PARAMETER offset +Offset to use + +.PARAMETER all +A return all results, works with -offset and other parameters + + +.PARAMETER url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +.PARAMETER apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command + +.EXAMPLE +Get-License -search SomeLicense + +.EXAMPLE +Get-License -id 1 + +#> + +function Get-SnipeItLicenseSeat() { + Param( + + [parameter(mandatory = $true)] + [int]$id, + + [int]$seat_id, + + [int]$limit = 50, + + [int]$offset, + + [switch]$all = $false, + + [parameter(mandatory = $true)] + [string]$url, + + [parameter(mandatory = $true)] + [string]$apiKey + ) + + Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name + + $SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters + + $apiurl = "$url/api/v1/licenses/$id/seats" + + + if ($seat_id) { + $apiurl= "$url/api/v1/licenses/$id/seats/$seat_id" + } + + $Parameters = @{ + Uri = $apiurl + Method = 'Get' + Token = $apiKey + GetParameters = $SearchParameter + } + + if ($all) { + $offstart = $(if($offset){$offset} Else {0}) + $callargs = $SearchParameter + $callargs.Remove('all') + + while ($true) { + $callargs['offset'] = $offstart + $callargs['limit'] = $limit + $res=Get-SnipeItLicenseSeat @callargs + $res + if ($res.count -lt $limit) { + break + } + $offstart = $offstart + $limit + } + } else { + $result = Invoke-SnipeitMethod @Parameters + $result + } +} + diff --git a/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 b/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 new file mode 100644 index 0000000..387c448 --- /dev/null +++ b/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 @@ -0,0 +1,78 @@ +<# + .SYNOPSIS + Set license seat or checkout license seat + .DESCRIPTION + Checkout specific license seat to user, asset or both + + .PARAMETER ID + Unique ID For asset to checkout + + .PARAMETER assigned_to + Id of target user + + .PARAMETER asset_id + Id of target asset + + .PARAMETER note + Notes about checkout + + .PARAMETER url + URL of Snipeit system, can be set using Set-SnipeItInfo command + + .PARAMETER apiKey + User's API Key for Snipeit, can be set using Set-SnipeItInfo command + + .EXAMPLE + Set-SnipeItLicenceSeat -ID 1 -seat_id 1 -assigned_id 3 -Verbose + Checkout licence to user id 3 + + .EXAMPLE + Set-SnipeItLicenceSeat -ID 1 -seat_id 1 -asset_id 3 -Verbose + Checkout licence to asset id 3 + +#> +function Set-SnipeItLicenceSeat() +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Medium" + )] + + Param( + [parameter(mandatory = $true)] + [int]$id, + + [parameter(mandatory = $true)] + [int]$seat_id, + + [int]$assigned_id, + + [int]$asset_id, + + [string]$note, + + [parameter(mandatory = $true)] + [string]$url, + + [parameter(mandatory = $true)] + [string]$apiKey + ) + + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters + + $Body = $Values | ConvertTo-Json; + + $Parameters = @{ + Uri = "$url/api/v1/licenses/$id/seats/$seat_id" + Method = 'Patch' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess("ShouldProcess?")) + { + $result = Invoke-SnipeitMethod @Parameters + } + + return $result +} diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index bc3f7f8..fa1464e 100644 --- a/SnipeitPS/SnipeItPS.psd1 +++ b/SnipeitPS/SnipeItPS.psd1 @@ -93,6 +93,8 @@ FunctionsToExport = @( 'New-SnipeItLicense', 'Set-SnipeItLicense', 'Get-SnipeItLicense', + 'Get-SnipeItLicenseSeat', + 'Set-SnipeItLicenseSeat', 'New-SnipeItLocation', 'New-SnipeItManufacturer', 'New-SnipeItModel', From bb4cf89bdd21095e033a5995cf658486e683a883 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sun, 23 May 2021 23:05:14 +0300 Subject: [PATCH 11/17] Updated examples --- SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 | 4 +--- SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 b/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 index 6a91813..5eef03a 100644 --- a/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1 @@ -28,10 +28,8 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-License -search SomeLicense +Get-SnipeItLicenseSeat -id 1 -.EXAMPLE -Get-License -id 1 #> diff --git a/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 b/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 index 387c448..3f8c7e8 100644 --- a/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1 @@ -31,7 +31,7 @@ Checkout licence to asset id 3 #> -function Set-SnipeItLicenceSeat() +function Set-SnipeItLicenseSeat() { [CmdletBinding( SupportsShouldProcess = $true, From 7d95d5078fd0d4dd78a2b3a8f9b3596b12f6398b Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sun, 23 May 2021 23:22:23 +0300 Subject: [PATCH 12/17] Updated docs and examples --- SnipeitPS/Public/Get-SnipeItAccessory.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItAsset.ps1 | 8 +- .../Public/Get-SnipeItAssetMaintenance.ps1 | 6 +- SnipeitPS/Public/Get-SnipeItCategory.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItCompany.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItComponent.ps1 | 6 +- SnipeitPS/Public/Get-SnipeItCustomField.ps1 | 2 +- SnipeitPS/Public/Get-SnipeItDepartment.ps1 | 6 +- SnipeitPS/Public/Get-SnipeItFieldset.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItLicense.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItLocation.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItManufacturer.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItModel.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItStatus.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItSupplier.ps1 | 4 +- SnipeitPS/Public/Get-SnipeItUser.ps1 | 8 +- SnipeitPS/Public/New-SnipeItAccessory.ps1 | 2 +- SnipeitPS/Public/New-SnipeItAsset.ps1 | 6 +- .../Public/New-SnipeItAssetMaintenance.ps1 | 2 +- SnipeitPS/Public/New-SnipeItAudit.ps1 | 2 +- SnipeitPS/Public/New-SnipeItCategory.ps1 | 2 +- SnipeitPS/Public/New-SnipeItCompany.ps1 | 2 +- SnipeitPS/Public/New-SnipeItCustomField.ps1 | 2 +- SnipeitPS/Public/New-SnipeItDepartment.ps1 | 2 +- SnipeitPS/Public/New-SnipeItLicense.ps1 | 2 +- SnipeitPS/Public/New-SnipeItLocation.ps1 | 2 +- SnipeitPS/Public/New-SnipeItManufacturer.ps1 | 2 +- SnipeitPS/Public/New-SnipeItModel.ps1 | 2 +- SnipeitPS/Public/New-SnipeItUser.ps1 | 2 +- SnipeitPS/Public/Remove-SnipeItAsset.ps1 | 2 +- .../Public/Remove-SnipeItAssetMaintenance.ps1 | 2 +- SnipeitPS/Public/Remove-SnipeItUser.ps1 | 2 +- SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 | 2 +- SnipeitPS/Public/Set-SnipeItAccessory.ps1 | 2 +- SnipeitPS/Public/Set-SnipeItAsset.ps1 | 4 +- SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 | 2 +- SnipeitPS/Public/Set-SnipeItLicense.ps1 | 2 +- SnipeitPS/Public/Set-SnipeItModel.ps1 | 2 +- SnipeitPS/Public/Set-SnipeItUser.ps1 | 2 +- docs/Get-SnipeItAccessory.md | 112 +++--- docs/Get-SnipeItAsset.md | 182 ++++----- docs/Get-SnipeItAssetMaintenance.md | 96 ++--- docs/Get-SnipeItCategory.md | 60 +-- docs/Get-SnipeItCompany.md | 60 +-- docs/Get-SnipeItComponent.md | 102 ++--- docs/Get-SnipeItCustomField.md | 32 +- docs/Get-SnipeItDepartment.md | 72 ++-- docs/Get-SnipeItFieldset.md | 34 +- docs/Get-SnipeItLicense.md | 351 ++++++++++++++++++ docs/Get-SnipeItLicenseSeat.md | 148 ++++++++ docs/Get-SnipeItManufacturer.md | 62 ++-- docs/Get-SnipeItModel.md | 60 +-- docs/Get-SnipeItStatus.md | 60 +-- docs/Get-SnipeItSupplier.md | 62 ++-- docs/Get-SnipeItUser.md | 116 +++--- docs/Get-SnipeitLocation.md | 62 ++-- docs/New-SnipeItAsset.md | 156 ++++---- docs/New-SnipeItAssetMaintenance.md | 110 +++--- docs/New-SnipeItCategory.md | 60 +-- docs/New-SnipeItComponent.md | 72 ++-- docs/New-SnipeItCustomField.md | 66 ++-- docs/New-SnipeItDepartment.md | 44 +-- docs/New-SnipeItLicense.md | 82 ++-- docs/New-SnipeItLocation.md | 88 ++--- docs/New-SnipeItManufacturer.md | 34 +- docs/New-SnipeItModel.md | 80 ++-- docs/New-SnipeItUser.md | 144 +++---- docs/Remove-SnipeItAsset.md | 46 +-- docs/Remove-SnipeItUser.md | 34 +- docs/Set-SnipeItAccessory.md | 106 +++--- docs/Set-SnipeItAsset.md | 152 ++++---- docs/Set-SnipeItAssetOwner.md | 92 ++--- docs/Set-SnipeItComponent.md | 88 ++--- docs/Set-SnipeItInfo.md | 18 +- docs/Set-SnipeItLicense.md | 114 +++--- docs/Set-SnipeItLicenseSeat.md | 186 ++++++++++ docs/Set-SnipeItModel.md | 94 ++--- docs/Set-SnipeItUser.md | 144 +++---- docs/Set-SnipeitLocation.md | 104 +++--- docs/SnipeItPS.md | 89 +++-- 80 files changed, 2354 insertions(+), 1648 deletions(-) create mode 100644 docs/Get-SnipeItLicense.md create mode 100644 docs/Get-SnipeItLicenseSeat.md create mode 100644 docs/Set-SnipeItLicenseSeat.md diff --git a/SnipeitPS/Public/Get-SnipeItAccessory.ps1 b/SnipeitPS/Public/Get-SnipeItAccessory.ps1 index e86937b..8ac47b9 100644 --- a/SnipeitPS/Public/Get-SnipeItAccessory.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAccessory.ps1 @@ -27,10 +27,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Accessory -search Keyboard +Get-SnipeItAccessory -search Keyboard .EXAMPLE -Get-Accessory -id 1 +Get-SnipeItAccessory -id 1 #> diff --git a/SnipeitPS/Public/Get-SnipeItAsset.ps1 b/SnipeitPS/Public/Get-SnipeItAsset.ps1 index c85312d..40bf01b 100644 --- a/SnipeitPS/Public/Get-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAsset.ps1 @@ -60,16 +60,16 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Asset -url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -url "https://assets.example.com"-token "token..." .EXAMPLE -Get-Asset -search "myMachine"-url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..." .EXAMPLE -Get-Asset -search "myMachine"-url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..." .EXAMPLE -Get-Asset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..." #> function Get-SnipeItAsset() { diff --git a/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 index 00efc33..602b0c6 100644 --- a/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/Get-SnipeItAssetMaintenance.ps1 @@ -30,13 +30,13 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-AssetMaintenances -url "https://assets.example.com" -token "token..." +Get-SnipeItAssetMaintenances -url "https://assets.example.com" -token "token..." .EXAMPLE -Get-AssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." +Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." .EXAMPLE -Get-AssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." +Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." #> function Get-SnipeItAssetMaintenance() { Param( diff --git a/SnipeitPS/Public/Get-SnipeItCategory.ps1 b/SnipeitPS/Public/Get-SnipeItCategory.ps1 index 72d64d8..827feb5 100644 --- a/SnipeitPS/Public/Get-SnipeItCategory.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCategory.ps1 @@ -24,10 +24,10 @@ Url of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Category -id 1 +Get-SnipeItCategory -id 1 .EXAMPLE -Get-Category -search "Laptop" +Get-SnipeItCategory -search "Laptop" #> diff --git a/SnipeitPS/Public/Get-SnipeItCompany.ps1 b/SnipeitPS/Public/Get-SnipeItCompany.ps1 index d105df8..99748d6 100644 --- a/SnipeitPS/Public/Get-SnipeItCompany.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCompany.ps1 @@ -23,11 +23,11 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Company +Get-SnipeItCompany Gets all companies .EXAMPLE -Get-Company -id 1 +Get-SnipeItCompany -id 1 Gets specific company #> diff --git a/SnipeitPS/Public/Get-SnipeItComponent.ps1 b/SnipeitPS/Public/Get-SnipeItComponent.ps1 index ef680e8..9adb8c1 100644 --- a/SnipeitPS/Public/Get-SnipeItComponent.ps1 +++ b/SnipeitPS/Public/Get-SnipeItComponent.ps1 @@ -24,15 +24,15 @@ URL of Snipeit system,can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Component +Get-SnipeItComponent Returns all components .EXAMPLE -Get-Component -search display +Get-SnipeItComponent -search display Returns search results containeing string display .EXAMPLE -Get-Component -id +Get-SnipeItComponent -id Returns specific component #> diff --git a/SnipeitPS/Public/Get-SnipeItCustomField.ps1 b/SnipeitPS/Public/Get-SnipeItCustomField.ps1 index fb4c1d8..276b7bf 100644 --- a/SnipeitPS/Public/Get-SnipeItCustomField.ps1 +++ b/SnipeitPS/Public/Get-SnipeItCustomField.ps1 @@ -12,7 +12,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Get-Field -url "https://assets.example.com" -token "token..." + Get-SnipeItCustomField -url "https://assets.example.com" -token "token..." #> diff --git a/SnipeitPS/Public/Get-SnipeItDepartment.ps1 b/SnipeitPS/Public/Get-SnipeItDepartment.ps1 index d9a527b..b80ec8a 100644 --- a/SnipeitPS/Public/Get-SnipeItDepartment.ps1 +++ b/SnipeitPS/Public/Get-SnipeItDepartment.ps1 @@ -24,13 +24,13 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Department -url "https://assets.example.com" -token "token..." +Get-SnipeItDepartment -url "https://assets.example.com" -token "token..." .EXAMPLE -Get-Department -search Department1 +Get-SnipeItDepartment -search Department1 .EXAMPLE -Get-Department -id 1 +Get-SnipeItDepartment -id 1 #> diff --git a/SnipeitPS/Public/Get-SnipeItFieldset.ps1 b/SnipeitPS/Public/Get-SnipeItFieldset.ps1 index fcc37c0..33d0252 100644 --- a/SnipeitPS/Public/Get-SnipeItFieldset.ps1 +++ b/SnipeitPS/Public/Get-SnipeItFieldset.ps1 @@ -12,10 +12,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Fieldset -url "https://assets.example.com" -token "token..." +Get-SnipeItFieldset -url "https://assets.example.com" -token "token..." .EXAMPLE -Get-Fieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" } +Get-SnipeItFieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" } #> diff --git a/SnipeitPS/Public/Get-SnipeItLicense.ps1 b/SnipeitPS/Public/Get-SnipeItLicense.ps1 index 08d91a0..bdca13b 100644 --- a/SnipeitPS/Public/Get-SnipeItLicense.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLicense.ps1 @@ -25,10 +25,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-License -search SomeLicense +Get-SnipeItLicense -search SomeLicense .EXAMPLE -Get-License -id 1 +Get-SnipeItLicense -id 1 #> diff --git a/SnipeitPS/Public/Get-SnipeItLocation.ps1 b/SnipeitPS/Public/Get-SnipeItLocation.ps1 index b16e9fc..718e251 100644 --- a/SnipeitPS/Public/Get-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/Get-SnipeItLocation.ps1 @@ -24,10 +24,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Location -search Location1 +Get-SnipeItLocation -search Location1 .EXAMPLE -Get-Location -id 3 +Get-SnipeItLocation -id 3 #> diff --git a/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 b/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 index 10e57fb..36bcb61 100644 --- a/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 +++ b/SnipeitPS/Public/Get-SnipeItManufacturer.ps1 @@ -24,11 +24,11 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Manufacturer -search HP +Get-SnipeItManufacturer -search HP Search all manufacturers for string HP .EXAMPLE -Get-Manufacturer -id 3 +Get-SnipeItManufacturer -id 3 Returns manufacturer with id 3 #> diff --git a/SnipeitPS/Public/Get-SnipeItModel.ps1 b/SnipeitPS/Public/Get-SnipeItModel.ps1 index 2ddd9dd..7219657 100644 --- a/SnipeitPS/Public/Get-SnipeItModel.ps1 +++ b/SnipeitPS/Public/Get-SnipeItModel.ps1 @@ -24,10 +24,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Model -search "DL380" +Get-SnipeItModel -search "DL380" .EXAMPLE -Get-Model -id 1 +Get-SnipeItModel -id 1 #> diff --git a/SnipeitPS/Public/Get-SnipeItStatus.ps1 b/SnipeitPS/Public/Get-SnipeItStatus.ps1 index e529b01..ebeb50b 100644 --- a/SnipeitPS/Public/Get-SnipeItStatus.ps1 +++ b/SnipeitPS/Public/Get-SnipeItStatus.ps1 @@ -24,10 +24,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Status -search "Ready to Deploy" +Get-SnipeItStatus -search "Ready to Deploy" .EXAMPLE -Get-Status -id 3 +Get-SnipeItStatus -id 3 #> diff --git a/SnipeitPS/Public/Get-SnipeItSupplier.ps1 b/SnipeitPS/Public/Get-SnipeItSupplier.ps1 index a6b2ec5..d5c84fe 100644 --- a/SnipeitPS/Public/Get-SnipeItSupplier.ps1 +++ b/SnipeitPS/Public/Get-SnipeItSupplier.ps1 @@ -24,10 +24,10 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-Supplier -search MySupplier +Get-SnipeItSupplier -search MySupplier .EXAMPLE -Get-Supplier -id 2 +Get-SnipeItSupplier -id 2 #> diff --git a/SnipeitPS/Public/Get-SnipeItUser.ps1 b/SnipeitPS/Public/Get-SnipeItUser.ps1 index 41b12c2..9f02830 100644 --- a/SnipeitPS/Public/Get-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Get-SnipeItUser.ps1 @@ -30,16 +30,16 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -Get-User -search SomeSurname +Get-SnipeItUser -search SomeSurname .EXAMPLE -Get-User -id 3 +Get-SnipeItUser -id 3 .EXAMPLE -Get-User -username someuser +Get-SnipeItUser -username someuser .EXAMPLE -Get-User -email user@somedomain.com +Get-SnipeItUser -email user@somedomain.com #> function Get-SnipeItUser() { diff --git a/SnipeitPS/Public/New-SnipeItAccessory.ps1 b/SnipeitPS/Public/New-SnipeItAccessory.ps1 index fea6331..493f628 100644 --- a/SnipeitPS/Public/New-SnipeItAccessory.ps1 +++ b/SnipeitPS/Public/New-SnipeItAccessory.ps1 @@ -54,7 +54,7 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -New-Accessory -name "Accessory" -qty 3 -category_id 1 +New-SnipeItAccessory -name "Accessory" -qty 3 -category_id 1 #> function New-SnipeItAccessory() { diff --git a/SnipeitPS/Public/New-SnipeItAsset.ps1 b/SnipeitPS/Public/New-SnipeItAsset.ps1 index 198d1e1..9db73ec 100644 --- a/SnipeitPS/Public/New-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/New-SnipeItAsset.ps1 @@ -53,15 +53,15 @@ Hastable of custom fields and extra fields that need passing through to Snipeit. Use internal field names from snipeit .You can use Get-CustomField to get internal field names. .EXAMPLE -New-Asset -status_id 1 -model_id 1 -name "Machine1" +New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" Create asset with automatic tag if tag genaration is enabled on snipe-it, other wise without tag .EXAMPLE -New-Asset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123" +New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123" Specifying asset tag when creating asset .EXAMPLE -New-Asset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" } +New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" } Using customfields when creating asset. #> diff --git a/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 index 3d53d54..0f37fd2 100644 --- a/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/New-SnipeItAssetMaintenance.ps1 @@ -37,7 +37,7 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -New-AssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01 +New-SnipeItAssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01 #> function New-SnipeItAssetMaintenance() { [CmdletBinding( diff --git a/SnipeitPS/Public/New-SnipeItAudit.ps1 b/SnipeitPS/Public/New-SnipeItAudit.ps1 index 21dd686..985979e 100644 --- a/SnipeitPS/Public/New-SnipeItAudit.ps1 +++ b/SnipeitPS/Public/New-SnipeItAudit.ps1 @@ -12,7 +12,7 @@ The asset tag of the asset you wish to audit ID of the location you want to associate with the audit .EXAMPLE -New-Audit -tag 1 -location_id 1 +New-SnipeItAudit -tag 1 -location_id 1 #> diff --git a/SnipeitPS/Public/New-SnipeItCategory.ps1 b/SnipeitPS/Public/New-SnipeItCategory.ps1 index d692d39..16a9c75 100644 --- a/SnipeitPS/Public/New-SnipeItCategory.ps1 +++ b/SnipeitPS/Public/New-SnipeItCategory.ps1 @@ -24,7 +24,7 @@ If switch is present, require users to confirm acceptance of assets in this cate If switch is present, send email to user on checkin/checkout .EXAMPLE -New-Category -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..." +New-SnipeItCategory -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..." #> function New-SnipeItCategory() diff --git a/SnipeitPS/Public/New-SnipeItCompany.ps1 b/SnipeitPS/Public/New-SnipeItCompany.ps1 index fbfb9f5..c479aeb 100644 --- a/SnipeitPS/Public/New-SnipeItCompany.ps1 +++ b/SnipeitPS/Public/New-SnipeItCompany.ps1 @@ -15,7 +15,7 @@ URL of Snipeit system, can be set using Set-SnipeItInfo command User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE -New-Company -name "Acme Company" +New-SnipeItCompany -name "Acme Company" #> diff --git a/SnipeitPS/Public/New-SnipeItCustomField.ps1 b/SnipeitPS/Public/New-SnipeItCustomField.ps1 index 219d014..d4b2d55 100644 --- a/SnipeitPS/Public/New-SnipeItCustomField.ps1 +++ b/SnipeitPS/Public/New-SnipeItCustomField.ps1 @@ -15,7 +15,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Field -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset" + New-SnipeItCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset" #> function New-SnipeItCustomField() diff --git a/SnipeitPS/Public/New-SnipeItDepartment.ps1 b/SnipeitPS/Public/New-SnipeItDepartment.ps1 index c51d094..d6141cd 100644 --- a/SnipeitPS/Public/New-SnipeItDepartment.ps1 +++ b/SnipeitPS/Public/New-SnipeItDepartment.ps1 @@ -24,7 +24,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Department -name "Department1" -company_id 1 -localtion_id 1 -manager_id 3 + New-SnipeItDepartment -name "Department1" -company_id 1 -localtion_id 1 -manager_id 3 #> diff --git a/SnipeitPS/Public/New-SnipeItLicense.ps1 b/SnipeitPS/Public/New-SnipeItLicense.ps1 index b5e4d4a..ecfc9df 100644 --- a/SnipeitPS/Public/New-SnipeItLicense.ps1 +++ b/SnipeitPS/Public/New-SnipeItLicense.ps1 @@ -63,7 +63,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Licence -name "License" -seats 3 -company_id 1 + New-SnipeItLicence -name "License" -seats 3 -company_id 1 #> diff --git a/SnipeitPS/Public/New-SnipeItLocation.ps1 b/SnipeitPS/Public/New-SnipeItLocation.ps1 index a6dc864..f3ecd6e 100644 --- a/SnipeitPS/Public/New-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/New-SnipeItLocation.ps1 @@ -42,7 +42,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Location -name "Room 1" -address "123 Asset Street" -parent_id 14 + New-SnipeItLocation -name "Room 1" -address "123 Asset Street" -parent_id 14 #> function New-SnipeItLocation() { diff --git a/SnipeitPS/Public/New-SnipeItManufacturer.ps1 b/SnipeitPS/Public/New-SnipeItManufacturer.ps1 index bcdbb30..c7c1f69 100644 --- a/SnipeitPS/Public/New-SnipeItManufacturer.ps1 +++ b/SnipeitPS/Public/New-SnipeItManufacturer.ps1 @@ -15,7 +15,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Manufacturer -name "HP" + New-SnipeItManufacturer -name "HP" #> function New-SnipeItManufacturer() diff --git a/SnipeitPS/Public/New-SnipeItModel.ps1 b/SnipeitPS/Public/New-SnipeItModel.ps1 index 6fe1119..603e052 100644 --- a/SnipeitPS/Public/New-SnipeItModel.ps1 +++ b/SnipeitPS/Public/New-SnipeItModel.ps1 @@ -27,7 +27,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 + New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 #> function New-SnipeItModel() diff --git a/SnipeitPS/Public/New-SnipeItUser.ps1 b/SnipeitPS/Public/New-SnipeItUser.ps1 index 120b26d..2dbac25 100644 --- a/SnipeitPS/Public/New-SnipeItUser.ps1 +++ b/SnipeitPS/Public/New-SnipeItUser.ps1 @@ -54,7 +54,7 @@ User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-user -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 + New-SnipeItuser -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 Creates new a new user who can't login to system .NOTES diff --git a/SnipeitPS/Public/Remove-SnipeItAsset.ps1 b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 index 013147c..3fe5f53 100644 --- a/SnipeitPS/Public/Remove-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 @@ -12,7 +12,7 @@ User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Remove-Asset -ID 44 -Verbose + Remove-SnipeItAsset -ID 44 -Verbose #> function Remove-SnipeItAsset () diff --git a/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 index b48afcb..e64c941 100644 --- a/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 @@ -13,7 +13,7 @@ function Remove-SnipeItAssetMaintenance { User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Remove-AssetMaintenance -ID 44 -url $url -apiKey $secret -Verbose + Remove-SnipeItAssetMaintenance -ID 44 -url $url -apiKey $secret -Verbose #> [CmdletBinding( SupportsShouldProcess = $true, diff --git a/SnipeitPS/Public/Remove-SnipeItUser.ps1 b/SnipeitPS/Public/Remove-SnipeItUser.ps1 index b30f550..b6f64cf 100644 --- a/SnipeitPS/Public/Remove-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItUser.ps1 @@ -13,7 +13,7 @@ User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Remove-User -ID 44 -url $url -apiKey $secret -Verbose + Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose #> function Remove-SnipeItUser () diff --git a/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 b/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 index e4588a7..235942a 100644 --- a/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 +++ b/SnipeitPS/Public/Reset-SnipeItAssetOwner.ps1 @@ -23,7 +23,7 @@ User's API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command .EXAMPLE - Remove-User -ID 44 -url $url -apiKey $secret -Verbose + Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose #> function Reset-SnipeItAssetOwner() { [CmdletBinding( diff --git a/SnipeitPS/Public/Set-SnipeItAccessory.ps1 b/SnipeitPS/Public/Set-SnipeItAccessory.ps1 index b0d619c..668092e 100644 --- a/SnipeitPS/Public/Set-SnipeItAccessory.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAccessory.ps1 @@ -54,7 +54,7 @@ URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command .EXAMPLE -Set-Accessory -id 1 -qty 3 +Set-SnipeItAccessory -id 1 -qty 3 #> function Set-SnipeItAccessory() { diff --git a/SnipeitPS/Public/Set-SnipeItAsset.ps1 b/SnipeitPS/Public/Set-SnipeItAsset.ps1 index 1e73704..fb3d6cf 100644 --- a/SnipeitPS/Public/Set-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAsset.ps1 @@ -60,10 +60,10 @@ Hastable of custom fields and extra fields that need passing through to Snipeit .EXAMPLE - Set-Asset -id 1 -status_id 1 -model_id 1 -name "Machine1" + Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" .EXAMPLE - Set-Asset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } + Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } #> function Set-SnipeItAsset() diff --git a/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 b/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 index 0c83ecb..55193f6 100644 --- a/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAssetOwner.ps1 @@ -31,7 +31,7 @@ User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Remove-User -ID 44 -url $url -apiKey $secret -Verbose + Set-SnipeItAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing check out to user" #> function Set-SnipeItAssetOwner() { diff --git a/SnipeitPS/Public/Set-SnipeItLicense.ps1 b/SnipeitPS/Public/Set-SnipeItLicense.ps1 index 0cf0b18..3e8dc5e 100644 --- a/SnipeitPS/Public/Set-SnipeItLicense.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLicense.ps1 @@ -66,7 +66,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Set-Licence -name "License" -seats 3 -company_id 1 + Set-SnipeItLicence -name "License" -seats 3 -company_id 1 #> diff --git a/SnipeitPS/Public/Set-SnipeItModel.ps1 b/SnipeitPS/Public/Set-SnipeItModel.ps1 index ad07e57..f2c7051 100644 --- a/SnipeitPS/Public/Set-SnipeItModel.ps1 +++ b/SnipeitPS/Public/Set-SnipeItModel.ps1 @@ -30,7 +30,7 @@ Users API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 + New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 #> function Set-SnipeItModel() { diff --git a/SnipeitPS/Public/Set-SnipeItUser.ps1 b/SnipeitPS/Public/Set-SnipeItUser.ps1 index 6486af3..38738a9 100644 --- a/SnipeitPS/Public/Set-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Set-SnipeItUser.ps1 @@ -54,7 +54,7 @@ User's API Key for Snipeit, can be set using Set-SnipeItInfo command .EXAMPLE - Update-user -id 3 -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 + Update-SnipeItUser -id 3 -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 Updates user with id 3 .NOTES diff --git a/docs/Get-SnipeItAccessory.md b/docs/Get-SnipeItAccessory.md index 1a6b592..7547e6b 100644 --- a/docs/Get-SnipeItAccessory.md +++ b/docs/Get-SnipeItAccessory.md @@ -25,42 +25,42 @@ Gets a list of Snipe-it Accessories ### EXAMPLE 1 ``` -Get-Accessory -search Keyboard +Get-SnipeItAccessory -search Keyboard ``` ### EXAMPLE 2 ``` -Get-Accessory -id 1 +Get-SnipeItAccessory -id 1 ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Accessory data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -company_id +{{ Fill company_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 11 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -80,8 +80,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -{{ Fill company_id Description }} +### -manufacturer_id +{{ Fill manufacturer_id Description }} ```yaml Type: Int32 @@ -89,16 +89,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -supplier_id +{{ Fill supplier_id Description }} ```yaml Type: Int32 @@ -106,104 +104,106 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: 50 +Position: 5 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -{{ Fill manufacturer_id Description }} +### -sort +{{ Fill sort Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: 0 +Position: 6 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Result offset to use +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 7 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: Desc +Position: 8 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Accessory data +### -offset +Result offset to use ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -{{ Fill sort Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: Created_at +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -{{ Fill supplier_id Description }} +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 5 -Default value: 0 +Required: True +Position: 10 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -211,7 +211,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 10 +Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItAsset.md b/docs/Get-SnipeItAsset.md index f10fa59..60f9bc5 100644 --- a/docs/Get-SnipeItAsset.md +++ b/docs/Get-SnipeItAsset.md @@ -27,58 +27,58 @@ Get-SnipeItAsset [[-search] ] [[-id] ] [[-asset_tag] ] [[ ### EXAMPLE 1 ``` -Get-Asset -url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -url "https://assets.example.com"-token "token..." ``` ### EXAMPLE 2 ``` -Get-Asset -search "myMachine"-url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..." ``` ### EXAMPLE 3 ``` -Get-Asset -search "myMachine"-url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..." ``` ### EXAMPLE 4 ``` -Get-Asset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..." +Get-SnipeItAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..." ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the assets data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +ID number of excact snipeit asset ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 20 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_serial -Exact asset serialnumber to query +### -asset_tag +Exact asset tag to query ```yaml Type: String @@ -86,14 +86,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_tag -Exact asset tag to query +### -asset_serial +Exact asset serialnumber to query ```yaml Type: String @@ -101,14 +101,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -Optionally restrict asset results to this category ID +### -order_number +Optionally restrict asset results to this order number ```yaml Type: Int32 @@ -116,14 +116,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -Optionally restrict asset results to this company ID +### -model_id +Optionally restrict asset results to this asset model ID ```yaml Type: Int32 @@ -131,14 +131,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -depreciation_id -{{ Fill depreciation_id Description }} +### -category_id +Optionally restrict asset results to this category ID ```yaml Type: Int32 @@ -146,14 +146,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 11 +Position: 7 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -ID number of excact snipeit asset +### -manufacturer_id +Optionally restrict asset results to this manufacturer ID ```yaml Type: Int32 @@ -161,16 +161,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 8 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -company_id +Optionally restrict asset results to this company ID ```yaml Type: Int32 @@ -178,8 +176,8 @@ Parameter Sets: (All) Aliases: Required: False -Position: 17 -Default value: 50 +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -199,8 +197,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -Optionally restrict asset results to this manufacturer ID +### -depreciation_id +{{ Fill depreciation_id Description }} ```yaml Type: Int32 @@ -208,149 +206,151 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 11 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -model_id -Optionally restrict asset results to this asset model ID +### -requestable +{{ Fill requestable Description }} ```yaml -Type: Int32 +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: 0 +Position: 12 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -status +Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 18 -Default value: 0 +Position: 13 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -Specify the order (asc or desc) you wish to order by on your sort column +### -status_id +Optionally restrict asset results to this status label ID ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 16 -Default value: Desc +Position: 14 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -Optionally restrict asset results to this order number +### -sort +Specify the column name you wish to sort by ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: 0 +Position: 15 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -requestable -{{ Fill requestable Description }} +### -order +Specify the order (asc or desc) you wish to order by on your sort column ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 12 -Default value: False +Position: 16 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the assets data +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: 17 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -Specify the column name you wish to sort by +### -offset +Offset to use ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: Created_at +Position: 18 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -status -Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 13 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -status_id -Optionally restrict asset results to this status label ID +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 14 -Default value: 0 +Required: True +Position: 19 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -358,7 +358,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 19 +Position: 20 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItAssetMaintenance.md b/docs/Get-SnipeItAssetMaintenance.md index fb3de97..dc207e7 100644 --- a/docs/Get-SnipeItAssetMaintenance.md +++ b/docs/Get-SnipeItAssetMaintenance.md @@ -24,85 +24,85 @@ Get-SnipeItAssetMaintenance [[-search] ] [[-asset_id] ] [[-sort] ### EXAMPLE 1 ``` -Get-AssetMaintenances -url "https://assets.example.com" -token "token..." +Get-SnipeItAssetMaintenances -url "https://assets.example.com" -token "token..." ``` ### EXAMPLE 2 ``` -Get-AssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." +Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." ``` ### EXAMPLE 3 ``` -Get-AssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." +Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..." ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +Search string ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -asset_id +Asset ID of the asset you'd like to return maintenances for ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 8 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_id -Asset ID of the asset you'd like to return maintenances for +### -sort +Specify the column name you wish to sort by ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -order +Specify the order (asc or desc) you wish to order by on your sort column ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: 50 +Position: 4 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml Type: Int32 @@ -110,59 +110,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: 0 +Position: 5 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -Specify the order (asc or desc) you wish to order by on your sort column +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -Search string +### -offset +Offset to use ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -Specify the column name you wish to sort by +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 3 -Default value: Created_at +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -170,7 +170,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItCategory.md b/docs/Get-SnipeItCategory.md index 97df32a..88d2ddc 100644 --- a/docs/Get-SnipeItCategory.md +++ b/docs/Get-SnipeItCategory.md @@ -24,57 +24,57 @@ Get-SnipeItCategory [[-search] ] [[-id] ] [[-order] ] [[- ### EXAMPLE 1 ``` -Get-Category -id 1 +Get-SnipeItCategory -id 1 ``` ### EXAMPLE 2 ``` -Get-Category -search "Laptop" +Get-SnipeItCategory -search "Laptop" ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Categories data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +A id of specific Category ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Category +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Categories data +### -url +Url of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -Url of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItCompany.md b/docs/Get-SnipeItCompany.md index 85f877e..3257b97 100644 --- a/docs/Get-SnipeItCompany.md +++ b/docs/Get-SnipeItCompany.md @@ -24,61 +24,61 @@ Get-SnipeItCompany [[-search] ] [[-id] ] [[-order] ] [[-l ### EXAMPLE 1 ``` -Get-Company +Get-SnipeItCompany ``` Gets all companies ### EXAMPLE 2 ``` -Get-Company -id 1 +Get-SnipeItCompany -id 1 ``` Gets specific company ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Companies data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +A id of specific Company ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Company +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -115,38 +115,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Companies data +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -154,7 +154,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItComponent.md b/docs/Get-SnipeItComponent.md index 5ee4bb1..1776a02 100644 --- a/docs/Get-SnipeItComponent.md +++ b/docs/Get-SnipeItComponent.md @@ -25,53 +25,53 @@ Get-SnipeItComponent [[-search] ] [[-id] ] [[-category_id] ] [-url] [-apiKey] [] [[-id] ] [[-order] ] [ ### EXAMPLE 1 ``` -Get-Department -url "https://assets.example.com" -token "token..." +Get-SnipeItDepartment -url "https://assets.example.com" -token "token..." ``` ### EXAMPLE 2 ``` -Get-Department -search Department1 +Get-SnipeItDepartment -search Department1 ``` ### EXAMPLE 3 ``` -Get-Department -id 1 +Get-SnipeItDepartment -id 1 ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Departments data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +A id of specific Department ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 8 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Department +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -116,23 +116,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Departments data +### -sort +{{ Fill sort Description }} ```yaml Type: String @@ -140,29 +140,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: 6 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -{{ Fill sort Description }} +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 6 -Default value: Created_at +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -170,7 +170,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItFieldset.md b/docs/Get-SnipeItFieldset.md index 2f3c54d..5185c15 100644 --- a/docs/Get-SnipeItFieldset.md +++ b/docs/Get-SnipeItFieldset.md @@ -23,48 +23,48 @@ Get-SnipeItFieldset [[-id] ] [-url] [-apiKey] [] [[-id] ] [[-name] ] [[-company_id] ] + [[-product_key] ] [[-order_number] ] [[-purchase_order] ] [[-license_name] ] + [[-license_email] ] [[-manufacturer_id] ] [[-supplier_id] ] + [[-depreciation_id] ] [[-category_id] ] [[-order] ] [[-sort] ] + [[-limit] ] [[-offset] ] [-all] [-url] [-apiKey] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-SnipeItLicense -search SomeLicense +``` + +### EXAMPLE 2 +``` +Get-SnipeItLicense -id 1 +``` + +## PARAMETERS + +### -search +A text string to search the Licenses data + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +A id of specific License + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +{{ Fill name Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -company_id +{{ Fill company_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -product_key +{{ Fill product_key Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -order_number +{{ Fill order_number Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -purchase_order +{{ Fill purchase_order Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -license_name +{{ Fill license_name Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -license_email +{{ Fill license_email Description }} + +```yaml +Type: MailAddress +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -manufacturer_id +{{ Fill manufacturer_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -supplier_id +{{ Fill supplier_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -depreciation_id +{{ Fill depreciation_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -category_id +{{ Fill category_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 13 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -order +{{ Fill order Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 14 +Default value: Desc +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -sort +{{ Fill sort Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 15 +Default value: Created_at +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 16 +Default value: 50 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -offset +Offset to use + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 17 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -all +A return all results, works with -offset and other parameters + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 18 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 19 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-SnipeItLicenseSeat.md b/docs/Get-SnipeItLicenseSeat.md new file mode 100644 index 0000000..db3221b --- /dev/null +++ b/docs/Get-SnipeItLicenseSeat.md @@ -0,0 +1,148 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Get-SnipeItLicenseSeat + +## SYNOPSIS +Gets a list of Snipe-it Licenses Seats or specific Seat + +## SYNTAX + +``` +Get-SnipeItLicenseSeat [-id] [[-seat_id] ] [[-limit] ] [[-offset] ] [-all] + [-url] [-apiKey] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-SnipeItLicenseSeat -id 1 +``` + +## PARAMETERS + +### -id +A id of specific License + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -seat_id +A id of specific seat + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: 50 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -offset +Offset to use + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -all +A return all results, works with -offset and other parameters + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Get-SnipeItManufacturer.md b/docs/Get-SnipeItManufacturer.md index e3a775f..fd87dd9 100644 --- a/docs/Get-SnipeItManufacturer.md +++ b/docs/Get-SnipeItManufacturer.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -24,61 +24,61 @@ Get-SnipeItManufacturer [[-search] ] [[-id] ] [[-order] ] ### EXAMPLE 1 ``` -Get-Manufacturer -search HP +Get-SnipeItManufacturer -search HP ``` Search all manufacturers for string HP ### EXAMPLE 2 ``` -Get-Manufacturer -id 3 +Get-SnipeItManufacturer -id 3 ``` Returns manufacturer with id 3 ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Manufactures data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -id +A id of specific Manufactuter ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Manufactuter +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -115,38 +115,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Manufactures data +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -154,7 +154,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItModel.md b/docs/Get-SnipeItModel.md index 77b2d62..c534e60 100644 --- a/docs/Get-SnipeItModel.md +++ b/docs/Get-SnipeItModel.md @@ -24,57 +24,57 @@ Get-SnipeItModel [[-search] ] [[-id] ] [[-order] ] [[-lim ### EXAMPLE 1 ``` -Get-Model -search "DL380" +Get-SnipeItModel -search "DL380" ``` ### EXAMPLE 2 ``` -Get-Model -id 1 +Get-SnipeItModel -id 1 ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Models data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +A id of specific model ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific model +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Models data +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItStatus.md b/docs/Get-SnipeItStatus.md index 2a287e0..ad5d2f5 100644 --- a/docs/Get-SnipeItStatus.md +++ b/docs/Get-SnipeItStatus.md @@ -24,57 +24,57 @@ Get-SnipeItStatus [[-search] ] [[-id] ] [[-order] ] [[-li ### EXAMPLE 1 ``` -Get-Status -search "Ready to Deploy" +Get-SnipeItStatus -search "Ready to Deploy" ``` ### EXAMPLE 2 ``` -Get-Status -id 3 +Get-SnipeItStatus -id 3 ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Status Labels data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +A id of specific Status Label ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Status Label +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Status Labels data +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItSupplier.md b/docs/Get-SnipeItSupplier.md index 5df5f74..dd2fbd5 100644 --- a/docs/Get-SnipeItSupplier.md +++ b/docs/Get-SnipeItSupplier.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -24,57 +24,57 @@ Get-SnipeItSupplier [[-search] ] [[-id] ] [[-order] ] [[- ### EXAMPLE 1 ``` -Get-Supplier -search MySupplier +Get-SnipeItSupplier -search MySupplier ``` ### EXAMPLE 2 ``` -Get-Supplier -id 2 +Get-SnipeItSupplier -id 2 ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Supliers data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -id +A id of specific Suplier ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Suplier +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Supliers data +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItUser.md b/docs/Get-SnipeItUser.md index e7e1410..b157893 100644 --- a/docs/Get-SnipeItUser.md +++ b/docs/Get-SnipeItUser.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -26,51 +26,51 @@ Get-SnipeItUser [[-search] ] [[-id] ] [[-company_id] ] [[ ### EXAMPLE 1 ``` -Get-User -search SomeSurname +Get-SnipeItUser -search SomeSurname ``` ### EXAMPLE 2 ``` -Get-User -id 3 +Get-SnipeItUser -id 3 ``` ### EXAMPLE 3 ``` -Get-User -username someuser +Get-SnipeItUser -username someuser ``` ### EXAMPLE 4 ``` -Get-User -email user@somedomain.com +Get-SnipeItUser -email user@somedomain.com ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the User data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -id +A id of specific User ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 13 +Required: False +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -91,8 +91,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -department_id -{{ Fill department_id Description }} +### -location_id +{{ Fill location_id Description }} ```yaml Type: Int32 @@ -100,29 +100,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -email -Search string for email field +### -group_id +{{ Fill group_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: None +Position: 5 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -group_id -{{ Fill group_id Description }} +### -department_id +{{ Fill department_id Description }} ```yaml Type: Int32 @@ -130,14 +130,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific User +### -username +Search string for username field ```yaml Type: String @@ -145,46 +145,46 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -email +Search string for email field ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 50 +Position: 8 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -{{ Fill location_id Description }} +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: 0 +Position: 9 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml Type: Int32 @@ -192,38 +192,38 @@ Parameter Sets: (All) Aliases: Required: False -Position: 11 -Default value: 0 +Position: 10 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -offset +Offset to use ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: Desc +Position: 11 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the User data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` @@ -243,16 +243,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -username -Search string for username field +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 7 +Required: True +Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeitLocation.md b/docs/Get-SnipeitLocation.md index fbf0088..920baac 100644 --- a/docs/Get-SnipeitLocation.md +++ b/docs/Get-SnipeitLocation.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -24,57 +24,57 @@ Get-SnipeitLocation [[-search] ] [[-id] ] [[-order] ] [[- ### EXAMPLE 1 ``` -Get-Location -search Location1 +Get-SnipeItLocation -search Location1 ``` ### EXAMPLE 2 ``` -Get-Location -id 3 +Get-SnipeItLocation -id 3 ``` ## PARAMETERS -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Locations data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -id +A id of specific Location ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Location +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: 0 +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -search -A text string to search the Locations data +### -url +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/New-SnipeItAsset.md b/docs/New-SnipeItAsset.md index 76e1b2a..0f5a2c6 100644 --- a/docs/New-SnipeItAsset.md +++ b/docs/New-SnipeItAsset.md @@ -27,105 +27,119 @@ Long description ### EXAMPLE 1 ``` -New-Asset -status_id 1 -model_id 1 -name "Machine1" +New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" ``` Create asset with automatic tag if tag genaration is enabled on snipe-it, other wise without tag ### EXAMPLE 2 ``` -New-Asset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123" +New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123" ``` Specifying asset tag when creating asset ### EXAMPLE 3 ``` -New-Asset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" } +New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" } ``` Using customfields when creating asset. ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -status_id +Required Status ID of the asset, this can be got using Get-Status ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 15 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_tag -Asset Tag for the Asset, not required when snipe asset_tag autogeneration is on. +### -model_id +Required Model ID of the asset, this can be got using Get-Model + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +Optional Name of the Asset ```yaml Type: String Parameter Sets: (All) -Aliases: tag +Aliases: Required: False -Position: 4 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -Optional Company id +### -asset_tag +Asset Tag for the Asset, not required when snipe asset_tag autogeneration is on. ```yaml -Type: Int32 +Type: String Parameter Sets: (All) -Aliases: +Aliases: tag Required: False -Position: 6 -Default value: 0 +Position: 4 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -customfields -Hastable of custom fields and extra fields that need passing through to Snipeit. -Use internal field names from snipeit .You can use Get-CustomField to get internal field names. +### -serial +Optional Serial number of the Asset ```yaml -Type: Hashtable +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 16 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -model_id -Required Model ID of the asset, this can be got using Get-Model +### -company_id +Optional Company id ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 2 +Required: False +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Optional Name of the Asset +### -order_number +Optional Order number ```yaml Type: String @@ -133,7 +147,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -154,17 +168,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -Optional Order number +### -warranty_months +{{ Fill warranty_months Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: None +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -199,8 +213,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -rtd_location_id -Optional Default location id for the asset +### -supplier_id +{{ Fill supplier_id Description }} ```yaml Type: Int32 @@ -208,59 +222,44 @@ Parameter Sets: (All) Aliases: Required: False -Position: 13 +Position: 12 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -serial -Optional Serial number of the Asset - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -status_id -Required Status ID of the asset, this can be got using Get-Status +### -rtd_location_id +Optional Default location id for the asset ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 13 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -{{ Fill supplier_id Description }} +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 12 -Default value: 0 +Required: True +Position: 14 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -268,34 +267,36 @@ Parameter Sets: (All) Aliases: Required: True -Position: 14 +Position: 15 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -warranty_months -{{ Fill warranty_months Description }} +### -customfields +Hastable of custom fields and extra fields that need passing through to Snipeit. +Use internal field names from snipeit .You can use Get-CustomField to get internal field names. ```yaml -Type: Int32 +Type: Hashtable Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 16 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -304,14 +305,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItAssetMaintenance.md b/docs/New-SnipeItAssetMaintenance.md index 8474800..39c2272 100644 --- a/docs/New-SnipeItAssetMaintenance.md +++ b/docs/New-SnipeItAssetMaintenance.md @@ -26,28 +26,28 @@ Long description ### EXAMPLE 1 ``` -New-AssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01 +New-SnipeItAssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -asset_id +Required ID of the asset, this can be got using Get-Asset ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 11 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_id -Required ID of the asset, this can be got using Get-Asset +### -supplier_id +Required maintenance supplier ```yaml Type: Int32 @@ -55,7 +55,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 2 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -76,98 +76,98 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -completion_date -{{ Fill completion_date Description }} +### -title +Required Title of maintenance ```yaml -Type: DateTime +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 6 +Required: True +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -cost -Optional cost +### -start_date +Required start date ```yaml -Type: Decimal +Type: DateTime Parameter Sets: (All) Aliases: -Required: False -Position: 8 -Default value: 0 +Required: True +Position: 5 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -is_warranty -Optional Maintenance done under warranty +### -completion_date +{{ Fill completion_date Description }} ```yaml -Type: Boolean +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: False +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -Optional cost +### -is_warranty +Optional Maintenance done under warranty ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: None +Position: 7 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -start_date -Required start date +### -cost +Optional cost ```yaml -Type: DateTime +Type: Decimal Parameter Sets: (All) Aliases: -Required: True -Position: 5 -Default value: None +Required: False +Position: 8 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -Required maintenance supplier +### -notes +Optional cost ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 2 -Default value: 0 +Required: False +Position: 9 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -title -Required Title of maintenance +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -175,14 +175,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 4 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -190,19 +190,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 10 +Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -211,14 +212,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItCategory.md b/docs/New-SnipeItCategory.md index 3b1b56a..a96c4fb 100644 --- a/docs/New-SnipeItCategory.md +++ b/docs/New-SnipeItCategory.md @@ -24,13 +24,13 @@ New-SnipeItCategory [-name] [-category_type] [-url] [ ### EXAMPLE 1 ``` -New-Category -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..." +New-SnipeItCategory -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..." ``` ## PARAMETERS -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -name +Name of new category to be created ```yaml Type: String @@ -38,7 +38,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 4 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -59,23 +59,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -checkin_email -If switch is present, send email to user on checkin/checkout +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False +Required: True +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of new category to be created +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -83,14 +83,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -require_acceptance -If switch is present, require users to confirm acceptance of assets in this category +### -use_default_eula +If switch is present, use the primary default EULA ```yaml Type: SwitchParameter @@ -104,23 +104,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -require_acceptance +If switch is present, require users to confirm acceptance of assets in this category ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: -Required: True -Position: 3 -Default value: None +Required: False +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -use_default_eula -If switch is present, use the primary default EULA +### -checkin_email +If switch is present, send email to user on checkin/checkout ```yaml Type: SwitchParameter @@ -134,13 +134,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -149,14 +150,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItComponent.md b/docs/New-SnipeItComponent.md index 8bc5144..60910d3 100644 --- a/docs/New-SnipeItComponent.md +++ b/docs/New-SnipeItComponent.md @@ -30,8 +30,8 @@ An example ## PARAMETERS -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -name +Component name ```yaml Type: String @@ -39,7 +39,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 9 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -60,6 +60,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -qty +Quantity of the components you have + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -company_id {{ Fill company_id Description }} @@ -90,16 +105,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Component name +### -purchase_date +Date accessory was purchased ```yaml -Type: String +Type: DateTime Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -120,23 +135,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_date -Date accessory was purchased - -```yaml -Type: DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -qty -Quantity of the components you have +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -144,14 +144,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -159,19 +159,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -180,14 +181,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItCustomField.md b/docs/New-SnipeItCustomField.md index fb55d4a..90f207a 100644 --- a/docs/New-SnipeItCustomField.md +++ b/docs/New-SnipeItCustomField.md @@ -25,13 +25,13 @@ Add a new Custom Field to Snipe-it asset system ### EXAMPLE 1 ``` -New-Field -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset" +New-SnipeItCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset" ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -Name +Name of the Custom Field ```yaml Type: String @@ -39,14 +39,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -CustomFormat -{{ Fill CustomFormat Description }} +### -HelpText +{{ Fill HelpText Description }} ```yaml Type: String @@ -54,7 +54,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -75,38 +75,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -field_encrypted -{{ Fill field_encrypted Description }} +### -Format +{{ Fill Format Description }} ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: False +Position: 4 +Default value: ANY Accept pipeline input: False Accept wildcard characters: False ``` -### -Format -{{ Fill Format Description }} +### -field_encrypted +{{ Fill field_encrypted Description }} ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: ANY +Position: 5 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -HelpText -{{ Fill HelpText Description }} +### -CustomFormat +{{ Fill CustomFormat Description }} ```yaml Type: String @@ -114,14 +114,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -Name of the Custom Field +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -129,14 +129,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -144,19 +144,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -165,14 +166,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItDepartment.md b/docs/New-SnipeItDepartment.md index c94b892..797b985 100644 --- a/docs/New-SnipeItDepartment.md +++ b/docs/New-SnipeItDepartment.md @@ -24,13 +24,13 @@ Creates a new department on Snipe-It system ### EXAMPLE 1 ``` -New-Department -name "Department1" -company_id 1 -localtion_id 1 -manager_id 3 +New-SnipeItDepartment -name "Department1" -company_id 1 -localtion_id 1 -manager_id 3 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -name +Department Name ```yaml Type: String @@ -38,7 +38,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -89,38 +89,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Department Name +### -notes +{{ Fill notes Description }} ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -{{ Fill notes Description }} +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -128,19 +128,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -149,14 +150,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItLicense.md b/docs/New-SnipeItLicense.md index e628927..841736b 100644 --- a/docs/New-SnipeItLicense.md +++ b/docs/New-SnipeItLicense.md @@ -28,13 +28,13 @@ Creates a new licence on Snipe-It system ### EXAMPLE 1 ``` -New-Licence -name "License" -seats 3 -company_id 1 +New-SnipeItLicence -name "License" -seats 3 -company_id 1 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -name +Name of license being created ```yaml Type: String @@ -42,12 +42,27 @@ Parameter Sets: (All) Aliases: Required: True -Position: 19 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -seats +Number of license seats owned. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -category_id {{ Fill category_id Description }} @@ -153,21 +168,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of license being created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -notes License Notes @@ -243,21 +243,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -seats -Number of license seats owned. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -serial Serialnumber of license @@ -304,7 +289,7 @@ Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -318,16 +303,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) -Aliases: cf +Aliases: -Required: False -Position: Named +Required: True +Position: 19 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -349,6 +334,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/New-SnipeItLocation.md b/docs/New-SnipeItLocation.md index 3ec6c2b..8f5f31f 100644 --- a/docs/New-SnipeItLocation.md +++ b/docs/New-SnipeItLocation.md @@ -25,11 +25,26 @@ Long description ### EXAMPLE 1 ``` -New-Location -name "Room 1" -address "123 Asset Street" -parent_id 14 +New-SnipeItLocation -name "Room 1" -address "123 Asset Street" -parent_id 14 ``` ## PARAMETERS +### -name +Name of the Location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -address Address line 1 of the location @@ -60,16 +75,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -state +Address State of the location ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 11 +Required: False +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -90,8 +105,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ldap_ou -The LDAP OU of the location +### -zip +The zip code of the location ```yaml Type: String @@ -99,14 +114,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -manager_id -The manager ID of the location +### -parent_id +Parent location ID for the location ```yaml Type: Int32 @@ -114,29 +129,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 7 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of the Location - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -parent_id -Parent location ID for the location +### -manager_id +The manager ID of the location ```yaml Type: Int32 @@ -144,14 +144,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 8 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -state -Address State of the location +### -ldap_ou +The LDAP OU of the location ```yaml Type: String @@ -159,14 +159,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -180,28 +180,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -zip -The zip code of the location +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 6 +Required: True +Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -210,14 +211,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItManufacturer.md b/docs/New-SnipeItManufacturer.md index 5a07084..50cd5e9 100644 --- a/docs/New-SnipeItManufacturer.md +++ b/docs/New-SnipeItManufacturer.md @@ -24,13 +24,13 @@ Long description ### EXAMPLE 1 ``` -New-Manufacturer -name "HP" +New-SnipeItManufacturer -name "HP" ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -Name +Name of the Manufacturer ```yaml Type: String @@ -38,14 +38,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -Name of the Manufacturer +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -53,14 +53,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -68,19 +68,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -89,14 +90,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItModel.md b/docs/New-SnipeItModel.md index 6f69c93..105f39b 100644 --- a/docs/New-SnipeItModel.md +++ b/docs/New-SnipeItModel.md @@ -25,13 +25,13 @@ Long description ### EXAMPLE 1 ``` -New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 +New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -name +Name of the Asset Model ```yaml Type: String @@ -39,44 +39,44 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -Category ID that the asset belongs to this can be got using Get-Category +### -model_number +Model number of the Asset Model ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 3 -Default value: 0 +Required: False +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -eol -{{ Fill eol Description }} +### -category_id +Category ID that the asset belongs to this can be got using Get-Category ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 3 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -fieldset_id -Fieldset ID that the asset uses (Custom fields) +### -manufacturer_id +Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer ```yaml Type: Int32 @@ -84,44 +84,44 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer +### -eol +{{ Fill eol Description }} ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 4 +Required: False +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -model_number -Model number of the Asset Model +### -fieldset_id +Fieldset ID that the asset uses (Custom fields) ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: None +Required: True +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of the Asset Model +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -129,14 +129,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -144,19 +144,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -165,14 +166,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/New-SnipeItUser.md b/docs/New-SnipeItUser.md index 3ecf106..07eb6be 100644 --- a/docs/New-SnipeItUser.md +++ b/docs/New-SnipeItUser.md @@ -27,30 +27,30 @@ Creates a new user to Snipe-IT system ### EXAMPLE 1 ``` -New-user -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 +New-SnipeItuser -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 ``` Creates new a new user who can't login to system ## PARAMETERS -### -activated -{{ Fill activated Description }} +### -first_name +Users first name ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 5 -Default value: False +Required: True +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -last_name +Users last name ```yaml Type: String @@ -58,59 +58,59 @@ Parameter Sets: (All) Aliases: Required: True -Position: 17 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -ID number of company users belogs to +### -username +Username for user ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 10 -Default value: 0 +Required: True +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -department_id -ID number of department +### -password +{{ Fill password Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 12 -Default value: 0 +Position: 4 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -email -email address +### -activated +{{ Fill activated Description }} ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: None +Position: 5 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -employee_num -Employeenumber +### -notes +User Notes ```yaml Type: String @@ -118,29 +118,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 14 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -first_name -Users first name +### -jobtitle +Users job tittle ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -jobtitle -Users job tittle +### -email +email address ```yaml Type: String @@ -148,38 +148,38 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -last_name -Users last name +### -phone +Phone number ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 2 +Required: False +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ldap_import -Mark user as import from ldap +### -company_id +ID number of company users belogs to ```yaml -Type: Boolean +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: False +Position: 10 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -199,8 +199,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -manager_id -ID number of manager +### -department_id +ID number of department ```yaml Type: Int32 @@ -208,29 +208,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 13 +Position: 12 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -User Notes +### -manager_id +ID number of manager ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: None +Position: 13 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -password -{{ Fill password Description }} +### -employee_num +Employeenumber ```yaml Type: String @@ -238,29 +238,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -phone -Phone number +### -ldap_import +Mark user as import from ldap ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: None +Position: 15 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -274,8 +274,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -username -Username for user +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -283,19 +283,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 17 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -304,14 +305,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Remove-SnipeItAsset.md b/docs/Remove-SnipeItAsset.md index de978c4..8ac679c 100644 --- a/docs/Remove-SnipeItAsset.md +++ b/docs/Remove-SnipeItAsset.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Remove-SnipeItAsset ## SYNOPSIS -Removes Asset to Snipe-it asset system +Removes Asset from Snipe-it asset system ## SYNTAX @@ -17,49 +17,49 @@ Remove-SnipeItAsset [-ID] [-URL] [-APIKey] [-WhatIf] [ ``` ## DESCRIPTION -Long description +Removes Asset from Snipe-it asset system ## EXAMPLES ### EXAMPLE 1 ``` -Remove-Asset -ID 44 -Verbose +Remove-SnipeItAsset -ID 44 -Verbose ``` ## PARAMETERS -### -APIKey -User's API Key for Snipeit, can be set using Set-Info command +### -ID +Unique ID For Asset to be removed ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 3 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -ID -Unique ID For Asset to be removed +### -URL +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -URL -URL of Snipeit system, can be set using Set-Info command +### -APIKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -67,19 +67,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -88,14 +89,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Remove-SnipeItUser.md b/docs/Remove-SnipeItUser.md index d0ff674..891ffd5 100644 --- a/docs/Remove-SnipeItUser.md +++ b/docs/Remove-SnipeItUser.md @@ -23,13 +23,13 @@ Long description ### EXAMPLE 1 ``` -Remove-User -ID 44 -url $url -apiKey $secret -Verbose +Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose ``` ## PARAMETERS -### -APIKey -User's API Key for Snipeit, can be set using Set-Info command +### -ID +Unique ID For User to be removed ```yaml Type: String @@ -37,14 +37,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ID -Unique ID For User to be removed +### -URL +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -52,14 +52,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -URL -URL of Snipeit system, can be set using Set-Info command +### -APIKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -67,19 +67,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -88,14 +89,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Set-SnipeItAccessory.md b/docs/Set-SnipeItAccessory.md index 0915aae..06e039a 100644 --- a/docs/Set-SnipeItAccessory.md +++ b/docs/Set-SnipeItAccessory.md @@ -26,43 +26,43 @@ Updates accessory on Snipe-It system ### EXAMPLE 1 ``` -Set-Accessory -id 1 -qty 3 +Set-SnipeItAccessory -id 1 -qty 3 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +{{ Fill id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 13 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -ID number of the category the accessory belongs to +### -name +ID number of Accessory on Snipe-It system ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: 0 +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -ID Number of the company the accessory is assigned to +### -qty +Quantity of the accessory you have ```yaml Type: Int32 @@ -70,29 +70,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 3 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -{{ Fill id Description }} +### -category_id +ID number of the category the accessory belongs to ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -ID number of the manufacturer for this accessory. +### -company_id +ID Number of the company the accessory is assigned to ```yaml Type: Int32 @@ -100,38 +100,23 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -min_qty -Min quantity of the accessory before alert is triggered - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 10 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -name -ID number of Accessory on Snipe-It system +### -manufacturer_id +ID number of the manufacturer for this accessory. ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: None +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -181,17 +166,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -qty -Quantity of the accessory you have +### -min_qty +Min quantity of the accessory before alert is triggered ```yaml -Type: Int32 +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: 0 +Position: 10 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` @@ -212,7 +197,7 @@ Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command ```yaml Type: String @@ -226,16 +211,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) -Aliases: cf +Aliases: -Required: False -Position: Named +Required: True +Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -257,6 +242,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Set-SnipeItAsset.md b/docs/Set-SnipeItAsset.md index ab0765b..4ad339a 100644 --- a/docs/Set-SnipeItAsset.md +++ b/docs/Set-SnipeItAsset.md @@ -27,124 +27,123 @@ Long description ### EXAMPLE 1 ``` -Set-Asset -id 1 -status_id 1 -model_id 1 -name "Machine1" +Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" ``` ### EXAMPLE 2 ``` -Set-Asset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } +Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +ID of the Asset ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 17 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -archived -Whether or not the asset is archived. -Archived assets cannot be checked out and do not show up in the deployable asset screens +### -Name +Asset name ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 14 -Default value: False +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -assigned_to -The id of the user the asset is currently checked out to +### -Status_id +Status ID of the asset, this can be got using Get-Status ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -The id of an associated company id +### -Model_id +Model ID of the asset, this can be got using Get-Model ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: 0 +Position: 4 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -customfields -Hastable of custom fields and extra fields that need passing through to Snipeit +### -last_checkout +Date the asset was last checked out ```yaml -Type: Hashtable +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 18 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -id -ID of the Asset +### -assigned_to +The id of the user the asset is currently checked out to ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -last_checkout -Date the asset was last checked out +### -company_id +The id of an associated company id ```yaml -Type: DateTime +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: None +Position: 7 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -Model_id -Model ID of the asset, this can be got using Get-Model +### -serial +Serial number of the asset ```yaml Type: String @@ -152,14 +151,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -Asset name +### -order_number +Order number for the asset ```yaml Type: String @@ -167,23 +166,23 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -Order number for the asset +### -warranty_months +Number of months for the asset warranty ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: None +Position: 10 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -233,53 +232,54 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -rtd_location_id -The id that corresponds to the location where the asset is usually located when not checked out +### -archived +Whether or not the asset is archived. +Archived assets cannot be checked out and do not show up in the deployable asset screens ```yaml -Type: Int32 +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: 0 +Position: 14 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -serial -Serial number of the asset +### -rtd_location_id +The id that corresponds to the location where the asset is usually located when not checked out ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: None +Position: 15 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -Status_id -Status ID of the asset, this can be got using Get-Status +### -url +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 3 +Required: True +Position: 16 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command ```yaml Type: String @@ -287,34 +287,35 @@ Parameter Sets: (All) Aliases: Required: True -Position: 16 +Position: 17 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -warranty_months -Number of months for the asset warranty +### -customfields +Hastable of custom fields and extra fields that need passing through to Snipeit ```yaml -Type: Int32 +Type: Hashtable Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 0 +Position: 18 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -323,14 +324,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Set-SnipeItAssetOwner.md b/docs/Set-SnipeItAssetOwner.md index e7a75c8..1d0dc2c 100644 --- a/docs/Set-SnipeItAssetOwner.md +++ b/docs/Set-SnipeItAssetOwner.md @@ -25,22 +25,22 @@ Checkout asset to user/localtion/asset ### EXAMPLE 1 ``` -Remove-User -ID 44 -url $url -apiKey $secret -Verbose +Set-SnipeItAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing check out to user" ``` ## PARAMETERS -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -id +Unique ID For asset to checkout ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 9 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -60,23 +60,26 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -checkout_at -Optional date to override the checkout time of now +### -checkout_to_type +{{ Fill checkout_to_type Description }} ```yaml -Type: DateTime +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: None +Position: 3 +Default value: User Accept pipeline input: False Accept wildcard characters: False ``` -### -checkout_to_type -{{ Fill checkout_to_type Description }} +### -name +Optional new asset name. +This is useful for changing the asset's name on new checkout, +for example, an asset that was named "Anna's Macbook Pro" could be renamed on the fly +when it's checked out to Elizabeth, to "Beth's Macbook Pro" ```yaml Type: String @@ -84,77 +87,74 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: User +Position: 4 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -expected_checkin -Optional date the asset is expected to be checked in +### -note +Notes about checkout ```yaml -Type: DateTime +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -id -Unique ID For asset to checkout +### -expected_checkin +Optional date the asset is expected to be checked in ```yaml -Type: Int32 +Type: DateTime Parameter Sets: (All) Aliases: -Required: True -Position: 1 -Default value: 0 +Required: False +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Optional new asset name. -This is useful for changing the asset's name on new checkout, -for example, an asset that was named "Anna's Macbook Pro" could be renamed on the fly -when it's checked out to Elizabeth, to "Beth's Macbook Pro" +### -checkout_at +Optional date to override the checkout time of now ```yaml -Type: String +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -note -Notes about checkout +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -162,19 +162,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -183,14 +184,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Set-SnipeItComponent.md b/docs/Set-SnipeItComponent.md index f48c027..52d0154 100644 --- a/docs/Set-SnipeItComponent.md +++ b/docs/Set-SnipeItComponent.md @@ -30,8 +30,8 @@ An example ## PARAMETERS -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -id +ID number of name ```yaml Type: String @@ -39,44 +39,44 @@ Parameter Sets: (All) Aliases: Required: True -Position: 9 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -{{ Fill company_id Description }} +### -qty +Quantity of the components you have ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 4 -Default value: 0 +Required: True +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -id -ID number of name +### -name +Component name ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -ID number of the location the accessory is assigned to +### -company_id +{{ Fill company_id Description }} ```yaml Type: Int32 @@ -84,59 +84,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Component name +### -location_id +ID number of the location the accessory is assigned to ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: None +Position: 5 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_cost -Cost of item being purchased. +### -purchase_date +Date accessory was purchased ```yaml -Type: Single +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: 0 +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_date -Date accessory was purchased +### -purchase_cost +Cost of item being purchased. ```yaml -Type: DateTime +Type: Single Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: None +Position: 7 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -qty -Quantity of the components you have +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -144,14 +144,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -159,19 +159,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -180,14 +181,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Set-SnipeItInfo.md b/docs/Set-SnipeItInfo.md index bcf16b2..5f7c4bb 100644 --- a/docs/Set-SnipeItInfo.md +++ b/docs/Set-SnipeItInfo.md @@ -23,36 +23,36 @@ Set apikey and url user to connect Snipe-It system ### EXAMPLE 1 ``` -Set-Info -url $url -apiKey -Verbose +Set-SnipeItInfo -url $url -apiKey -Verbose ``` ## PARAMETERS -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: String +Type: Uri Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Uri +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Set-SnipeItLicense.md b/docs/Set-SnipeItLicense.md index 5afe0a1..13416fb 100644 --- a/docs/Set-SnipeItLicense.md +++ b/docs/Set-SnipeItLicense.md @@ -28,26 +28,56 @@ Updates licence on Snipe-It system ### EXAMPLE 1 ``` -Set-Licence -name "License" -seats 3 -company_id 1 +Set-SnipeItLicence -name "License" -seats 3 -company_id 1 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +ID number of licence ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 20 +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +Name of license + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -seats +Number of license seats owned. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -category_id {{ Fill category_id Description }} @@ -93,21 +123,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -id -ID number of licence - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -license_email Email address associated with license @@ -168,21 +183,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of license - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -notes License Notes @@ -258,21 +258,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -seats -Number of license seats owned. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -serial Serialnumber of license @@ -319,7 +304,7 @@ Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -333,16 +318,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) -Aliases: cf +Aliases: -Required: False -Position: Named +Required: True +Position: 20 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -364,6 +349,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Set-SnipeItLicenseSeat.md b/docs/Set-SnipeItLicenseSeat.md new file mode 100644 index 0000000..3620715 --- /dev/null +++ b/docs/Set-SnipeItLicenseSeat.md @@ -0,0 +1,186 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Set-SnipeItLicenseSeat + +## SYNOPSIS +Set license seat or checkout license seat + +## SYNTAX + +``` +Set-SnipeItLicenseSeat [-id] [-seat_id] [[-assigned_id] ] [[-asset_id] ] + [[-note] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Checkout specific license seat to user, asset or both + +## EXAMPLES + +### EXAMPLE 1 +``` +Set-SnipeItLicenceSeat -ID 1 -seat_id 1 -assigned_id 3 -Verbose +``` + +Checkout licence to user id 3 + +### EXAMPLE 2 +``` +Set-SnipeItLicenceSeat -ID 1 -seat_id 1 -asset_id 3 -Verbose +``` + +Checkout licence to asset id 3 + +## PARAMETERS + +### -id +Unique ID For asset to checkout + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -seat_id +{{ Fill seat_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -assigned_id +{{ Fill assigned_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -asset_id +Id of target asset + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -note +Notes about checkout + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Set-SnipeItModel.md b/docs/Set-SnipeItModel.md index 5475fe1..40c5277 100644 --- a/docs/Set-SnipeItModel.md +++ b/docs/Set-SnipeItModel.md @@ -25,58 +25,58 @@ Updates Model on Snipe-it asset system ### EXAMPLE 1 ``` -New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 +New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 ``` ## PARAMETERS -### -apiKey -Users API Key for Snipeit, can be set using Set-Info command +### -id +ID number of the Asset Model ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 9 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -Category ID that the asset belongs to this can be got using Get-Category +### -name +Name of the Asset Model ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: 0 +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -custom_fieldset_id -{{ Fill custom_fieldset_id Description }} +### -model_number +Model number of the Asset Model ```yaml -Type: Int32 +Type: String Parameter Sets: (All) -Aliases: fieldset_id +Aliases: Required: False -Position: 7 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -eol -{{ Fill eol Description }} +### -category_id +Category ID that the asset belongs to this can be got using Get-Category ```yaml Type: Int32 @@ -84,29 +84,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -id -ID number of the Asset Model +### -manufacturer_id +Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer +### -eol +{{ Fill eol Description }} ```yaml Type: Int32 @@ -114,44 +114,44 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -model_number -Model number of the Asset Model +### -custom_fieldset_id +{{ Fill custom_fieldset_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) -Aliases: +Aliases: fieldset_id Required: False -Position: 3 -Default value: None +Position: 7 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of the Asset Model +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 +Required: True +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-Info command +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -159,19 +159,20 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -180,14 +181,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Set-SnipeItUser.md b/docs/Set-SnipeItUser.md index 799c740..4bf1538 100644 --- a/docs/Set-SnipeItUser.md +++ b/docs/Set-SnipeItUser.md @@ -27,75 +27,75 @@ Creates a new user to Snipe-IT system ### EXAMPLE 1 ``` -Update-user -id 3 -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 +Update-SnipeItUser -id 3 -fist_name It -lastname Snipe -username snipeit -activated $false -company_id 1 -location_id 1 -department_id 1 ``` Updates user with id 3 ## PARAMETERS -### -activated -{{ Fill activated Description }} +### -id +{{ Fill id Description }} ```yaml -Type: Boolean +Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 13 -Default value: False +Required: True +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-Info command +### -first_name +Users first name ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 16 +Required: False +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -ID number of company users belogs to +### -last_name +Users last name ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -department_id -ID number of department +### -userName +Username for user ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 0 +Position: 4 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -email -email address +### -jobtitle +Users job tittle ```yaml Type: String @@ -103,14 +103,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -employee_num -Employeenumber +### -email +email address ```yaml Type: String @@ -118,14 +118,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 12 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -first_name -Users first name +### -phone +Phone number ```yaml Type: String @@ -133,59 +133,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -id -{{ Fill id Description }} +### -company_id +ID number of company users belogs to ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 1 +Required: False +Position: 8 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -jobtitle -Users job tittle +### -location_id +ID number of localtion ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: None +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -last_name -Users last name +### -department_id +ID number of department ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: None +Position: 10 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -ID number of localtion +### -manager_id +ID number of manager ```yaml Type: Int32 @@ -193,44 +193,44 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 11 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manager_id -ID number of manager +### -employee_num +Employeenumber ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 11 -Default value: 0 +Position: 12 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -User Notes +### -activated +{{ Fill activated Description }} ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 14 -Default value: None +Position: 13 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -phone -Phone number +### -notes +User Notes ```yaml Type: String @@ -238,14 +238,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -url -URL of Snipeit system, can be set using Set-Info command +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -259,28 +259,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -userName -Username for user +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 4 +Required: True +Position: 16 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -289,14 +290,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/Set-SnipeitLocation.md b/docs/Set-SnipeitLocation.md index 792cc2a..6f22496 100644 --- a/docs/Set-SnipeitLocation.md +++ b/docs/Set-SnipeitLocation.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -30,8 +30,23 @@ Set-SnipeitLocation -id 123 -name "Some storage" -parent_id 100 ## PARAMETERS -### -address -Address line 1 +### -id +{{ Fill id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +Name of Location ```yaml Type: String @@ -39,14 +54,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -address2 -Address line 2 +### -address +Address line 1 ```yaml Type: String @@ -54,29 +69,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -address2 +Address line 2 ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 12 +Required: False +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -country -Address Contry +### -state +Address State ```yaml Type: String @@ -84,29 +99,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -id -{{ Fill id Description }} +### -country +Address Contry ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 1 -Default value: 0 +Required: False +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ldap_ou -LDAP OU of Location +### -zip +Address zipcode ```yaml Type: String @@ -114,7 +129,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -135,8 +150,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of Location +### -ldap_ou +LDAP OU of Location ```yaml Type: String @@ -144,7 +159,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -165,21 +180,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -state -Address State - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -url URL of Snipeit system, can be set using Set-SnipeItInfo command @@ -195,28 +195,29 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -zip -Address zipcode +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 7 +Required: True +Position: 12 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named @@ -225,14 +226,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named diff --git a/docs/SnipeItPS.md b/docs/SnipeItPS.md index 7f94ac4..256e56d 100644 --- a/docs/SnipeItPS.md +++ b/docs/SnipeItPS.md @@ -8,105 +8,126 @@ Locale: en-US # SnipeitPS Module ## Description -Powershell API for SnipeIt Asset Management +{{ Fill in the Description }} ## SnipeitPS Cmdlets ### [Get-SnipeItAccessory](Get-SnipeItAccessory.md) -Gets a list of Snipe-it Accessories +{{ Fill in the Description }} ### [Get-SnipeItAsset](Get-SnipeItAsset.md) -Gets a list of Snipe-it Assets or specific asset +{{ Fill in the Description }} ### [Get-SnipeItAssetMaintenance](Get-SnipeItAssetMaintenance.md) -Lists Snipe-it Assets Maintenances +{{ Fill in the Description }} ### [Get-SnipeItCategory](Get-SnipeItCategory.md) -Gets a list of Snipe-it Categories +{{ Fill in the Description }} ### [Get-SnipeItCompany](Get-SnipeItCompany.md) -Gets a list of Snipe-it Companies +{{ Fill in the Description }} ### [Get-SnipeItComponent](Get-SnipeItComponent.md) -Gets a list of Snipe-it Components +{{ Fill in the Description }} ### [Get-SnipeItCustomField](Get-SnipeItCustomField.md) -Returns specific Snipe-IT custom field or a list of all custom field +{{ Fill in the Description }} ### [Get-SnipeItDepartment](Get-SnipeItDepartment.md) -Gets a list of Snipe-it Departments +{{ Fill in the Description }} ### [Get-SnipeItFieldset](Get-SnipeItFieldset.md) -Returns a fieldset or list of Snipe-it Fieldsets +{{ Fill in the Description }} + +### [Get-SnipeItLicense](Get-SnipeItLicense.md) +{{ Fill in the Description }} + +### [Get-SnipeItLicenseSeat](Get-SnipeItLicenseSeat.md) +{{ Fill in the Description }} + +### [Get-SnipeitLocation](Get-SnipeitLocation.md) +{{ Fill in the Description }} + +### [Get-SnipeItManufacturer](Get-SnipeItManufacturer.md) +{{ Fill in the Description }} ### [Get-SnipeItModel](Get-SnipeItModel.md) -Gets a list of Snipe-it Models +{{ Fill in the Description }} ### [Get-SnipeItStatus](Get-SnipeItStatus.md) -Gets a list of Snipe-it Status Labels +{{ Fill in the Description }} + +### [Get-SnipeItSupplier](Get-SnipeItSupplier.md) +{{ Fill in the Description }} + +### [Get-SnipeItUser](Get-SnipeItUser.md) +{{ Fill in the Description }} ### [New-SnipeItAsset](New-SnipeItAsset.md) -Add a new Asset to Snipe-it asset system +{{ Fill in the Description }} ### [New-SnipeItAssetMaintenance](New-SnipeItAssetMaintenance.md) -Add a new Asset maintenence to Snipe-it asset system +{{ Fill in the Description }} ### [New-SnipeItCategory](New-SnipeItCategory.md) -Create a new Snipe-IT Category +{{ Fill in the Description }} ### [New-SnipeItComponent](New-SnipeItComponent.md) -Create a new component +{{ Fill in the Description }} ### [New-SnipeItCustomField](New-SnipeItCustomField.md) -Add a new Custom Field to Snipe-it asset system +{{ Fill in the Description }} ### [New-SnipeItDepartment](New-SnipeItDepartment.md) -Creates a department +{{ Fill in the Description }} ### [New-SnipeItLicense](New-SnipeItLicense.md) -Creates a licence +{{ Fill in the Description }} ### [New-SnipeItLocation](New-SnipeItLocation.md) -Add a new Location to Snipe-it asset system +{{ Fill in the Description }} ### [New-SnipeItManufacturer](New-SnipeItManufacturer.md) -Add a new Manufacturer to Snipe-it asset system +{{ Fill in the Description }} ### [New-SnipeItModel](New-SnipeItModel.md) -Add a new Model to Snipe-it asset system +{{ Fill in the Description }} ### [New-SnipeItUser](New-SnipeItUser.md) -Creates a new user +{{ Fill in the Description }} ### [Remove-SnipeItAsset](Remove-SnipeItAsset.md) -Removes Asset to Snipe-it asset system +{{ Fill in the Description }} ### [Remove-SnipeItUser](Remove-SnipeItUser.md) -Removes User from Snipe-it asset system +{{ Fill in the Description }} ### [Set-SnipeItAccessory](Set-SnipeItAccessory.md) -Updates accessory on Snipe-It system +{{ Fill in the Description }} ### [Set-SnipeItAsset](Set-SnipeItAsset.md) -Update a specific Asset in the Snipe-it asset system +{{ Fill in the Description }} ### [Set-SnipeItAssetOwner](Set-SnipeItAssetOwner.md) -Checkout asset +{{ Fill in the Description }} ### [Set-SnipeItComponent](Set-SnipeItComponent.md) -Updates component +{{ Fill in the Description }} ### [Set-SnipeItInfo](Set-SnipeItInfo.md) -Sets authetication information +{{ Fill in the Description }} ### [Set-SnipeItLicense](Set-SnipeItLicense.md) -Updates a licence +{{ Fill in the Description }} + +### [Set-SnipeItLicenseSeat](Set-SnipeItLicenseSeat.md) +{{ Fill in the Description }} ### [Set-SnipeitLocation](Set-SnipeitLocation.md) -Updates Location in Snipe-it asset system +{{ Fill in the Description }} ### [Set-SnipeItModel](Set-SnipeItModel.md) -Updates Model on Snipe-it asset system +{{ Fill in the Description }} ### [Set-SnipeItUser](Set-SnipeItUser.md) -Creates a new user +{{ Fill in the Description }} From 06305b1b6396e36cd92cb58a6066861e1dbcdfca Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Sun, 23 May 2021 23:24:44 +0300 Subject: [PATCH 13/17] Updated docs and examples --- docs/Get-SnipeItAccessory.md | 108 ++++++++--------- docs/Get-SnipeItAsset.md | 174 ++++++++++++++-------------- docs/Get-SnipeItAssetMaintenance.md | 90 +++++++------- docs/Get-SnipeItCategory.md | 56 ++++----- docs/Get-SnipeItCompany.md | 56 ++++----- docs/Get-SnipeItComponent.md | 96 +++++++-------- docs/Get-SnipeItCustomField.md | 30 ++--- docs/Get-SnipeItDepartment.md | 66 +++++------ docs/Get-SnipeItFieldset.md | 30 ++--- docs/Get-SnipeItLicense.md | 162 +++++++++++++------------- docs/Get-SnipeItLicenseSeat.md | 58 +++++----- docs/Get-SnipeItManufacturer.md | 58 +++++----- docs/Get-SnipeItModel.md | 56 ++++----- docs/Get-SnipeItStatus.md | 56 ++++----- docs/Get-SnipeItSupplier.md | 58 +++++----- docs/Get-SnipeItUser.md | 108 ++++++++--------- docs/Get-SnipeitLocation.md | 56 ++++----- docs/New-SnipeItAsset.md | 150 ++++++++++++------------ docs/New-SnipeItAssetMaintenance.md | 108 ++++++++--------- docs/New-SnipeItCategory.md | 58 +++++----- docs/New-SnipeItComponent.md | 72 ++++++------ docs/New-SnipeItCustomField.md | 64 +++++----- docs/New-SnipeItDepartment.md | 42 +++---- docs/New-SnipeItLicense.md | 78 ++++++------- docs/New-SnipeItLocation.md | 84 +++++++------- docs/New-SnipeItManufacturer.md | 32 ++--- docs/New-SnipeItModel.md | 78 ++++++------- docs/New-SnipeItUser.md | 140 +++++++++++----------- docs/Remove-SnipeItAsset.md | 40 +++---- docs/Remove-SnipeItUser.md | 32 ++--- docs/Set-SnipeItAccessory.md | 102 ++++++++-------- docs/Set-SnipeItAsset.md | 148 +++++++++++------------ docs/Set-SnipeItAssetOwner.md | 90 +++++++------- docs/Set-SnipeItComponent.md | 88 +++++++------- docs/Set-SnipeItInfo.md | 16 +-- docs/Set-SnipeItLicense.md | 110 +++++++++--------- docs/Set-SnipeItLicenseSeat.md | 56 ++++----- docs/Set-SnipeItModel.md | 92 +++++++-------- docs/Set-SnipeItUser.md | 140 +++++++++++----------- docs/Set-SnipeitLocation.md | 102 ++++++++-------- docs/SnipeItPS.md | 83 ++++++------- 41 files changed, 1657 insertions(+), 1666 deletions(-) diff --git a/docs/Get-SnipeItAccessory.md b/docs/Get-SnipeItAccessory.md index 7547e6b..259521f 100644 --- a/docs/Get-SnipeItAccessory.md +++ b/docs/Get-SnipeItAccessory.md @@ -35,32 +35,32 @@ Get-SnipeItAccessory -id 1 ## PARAMETERS -### -search -A text string to search the Accessory data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -{{ Fill company_id Description }} +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 11 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -80,8 +80,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -{{ Fill manufacturer_id Description }} +### -company_id +{{ Fill company_id Description }} ```yaml Type: Int32 @@ -89,14 +89,16 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 2 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -{{ Fill supplier_id Description }} +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml Type: Int32 @@ -104,106 +106,104 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: 0 +Position: 8 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -{{ Fill sort Description }} +### -manufacturer_id +{{ Fill manufacturer_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: Created_at +Position: 4 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -offset +Result offset to use ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: Desc +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: 50 +Position: 7 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Result offset to use +### -search +A text string to search the Accessory data ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -sort +{{ Fill sort Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 6 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -supplier_id +{{ Fill supplier_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 10 -Default value: None +Required: False +Position: 5 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -211,7 +211,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 11 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItAsset.md b/docs/Get-SnipeItAsset.md index 60f9bc5..7828560 100644 --- a/docs/Get-SnipeItAsset.md +++ b/docs/Get-SnipeItAsset.md @@ -47,38 +47,38 @@ Get-SnipeItAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token ## PARAMETERS -### -search -A text string to search the assets data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -ID number of excact snipeit asset +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 20 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_tag -Exact asset tag to query +### -asset_serial +Exact asset serialnumber to query ```yaml Type: String @@ -86,14 +86,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_serial -Exact asset serialnumber to query +### -asset_tag +Exact asset tag to query ```yaml Type: String @@ -101,14 +101,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -Optionally restrict asset results to this order number +### -category_id +Optionally restrict asset results to this category ID ```yaml Type: Int32 @@ -116,14 +116,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 7 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -model_id -Optionally restrict asset results to this asset model ID +### -company_id +Optionally restrict asset results to this company ID ```yaml Type: Int32 @@ -131,14 +131,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 9 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -Optionally restrict asset results to this category ID +### -depreciation_id +{{ Fill depreciation_id Description }} ```yaml Type: Int32 @@ -146,14 +146,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 11 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -Optionally restrict asset results to this manufacturer ID +### -id +ID number of excact snipeit asset ```yaml Type: Int32 @@ -161,14 +161,16 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 2 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -Optionally restrict asset results to this company ID +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml Type: Int32 @@ -176,8 +178,8 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 17 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` @@ -197,8 +199,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -depreciation_id -{{ Fill depreciation_id Description }} +### -manufacturer_id +Optionally restrict asset results to this manufacturer ID ```yaml Type: Int32 @@ -206,151 +208,149 @@ Parameter Sets: (All) Aliases: Required: False -Position: 11 +Position: 8 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -requestable -{{ Fill requestable Description }} +### -model_id +Optionally restrict asset results to this asset model ID ```yaml -Type: Boolean +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 12 -Default value: False +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -status -Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable +### -offset +Offset to use ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 13 -Default value: None +Position: 18 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -status_id -Optionally restrict asset results to this status label ID +### -order +Specify the order (asc or desc) you wish to order by on your sort column ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 14 -Default value: 0 +Position: 16 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -Specify the column name you wish to sort by +### -order_number +Optionally restrict asset results to this order number ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: Created_at +Position: 5 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -Specify the order (asc or desc) you wish to order by on your sort column +### -requestable +{{ Fill requestable Description }} ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 16 -Default value: Desc +Position: 12 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -search +A text string to search the assets data ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 17 -Default value: 50 +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -sort +Specify the column name you wish to sort by ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 18 -Default value: 0 +Position: 15 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -status +Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 13 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -status_id +Optionally restrict asset results to this status label ID ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 19 -Default value: None +Required: False +Position: 14 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -358,7 +358,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 20 +Position: 19 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItAssetMaintenance.md b/docs/Get-SnipeItAssetMaintenance.md index dc207e7..f2a4a63 100644 --- a/docs/Get-SnipeItAssetMaintenance.md +++ b/docs/Get-SnipeItAssetMaintenance.md @@ -39,70 +39,70 @@ Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.co ## PARAMETERS -### -search -Search string +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_id -Asset ID of the asset you'd like to return maintenances for +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 8 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -Specify the column name you wish to sort by +### -asset_id +Asset ID of the asset you'd like to return maintenances for ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Created_at +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -Specify the order (asc or desc) you wish to order by on your sort column +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: Desc +Position: 5 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -offset +Offset to use ```yaml Type: Int32 @@ -110,59 +110,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: 50 +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +Specify the order (asc or desc) you wish to order by on your sort column ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 4 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -search +Search string ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: 0 +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -sort +Specify the column name you wish to sort by ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 3 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -170,7 +170,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItCategory.md b/docs/Get-SnipeItCategory.md index 88d2ddc..b66f781 100644 --- a/docs/Get-SnipeItCategory.md +++ b/docs/Get-SnipeItCategory.md @@ -34,47 +34,47 @@ Get-SnipeItCategory -search "Laptop" ## PARAMETERS -### -search -A text string to search the Categories data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Category +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Category ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -Url of Snipeit system, can be set using Set-SnipeItInfo command +### -search +A text string to search the Categories data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +Url of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItCompany.md b/docs/Get-SnipeItCompany.md index 3257b97..e7f9d6b 100644 --- a/docs/Get-SnipeItCompany.md +++ b/docs/Get-SnipeItCompany.md @@ -38,47 +38,47 @@ Gets specific company ## PARAMETERS -### -search -A text string to search the Companies data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Company +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Company ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -115,38 +115,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -search +A text string to search the Companies data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -154,7 +154,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItComponent.md b/docs/Get-SnipeItComponent.md index 1776a02..1e8405a 100644 --- a/docs/Get-SnipeItComponent.md +++ b/docs/Get-SnipeItComponent.md @@ -46,32 +46,32 @@ Returns specific component ## PARAMETERS -### -search -A text string to search the Components data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Component +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 11 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -106,8 +106,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -{{ Fill location_id Description }} +### -id +A id of specific Component ```yaml Type: Int32 @@ -115,46 +115,46 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 2 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: Desc +Position: 8 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -{{ Fill sort Description }} +### -location_id +{{ Fill location_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: Created_at +Position: 5 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -offset +Offset to use ```yaml Type: Int32 @@ -162,59 +162,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: 50 +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 6 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the Components data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system,can be set using Set-SnipeItInfo command +### -sort +{{ Fill sort Description }} ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 10 -Default value: None +Required: False +Position: 7 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system,can be set using Set-SnipeItInfo command ```yaml Type: String @@ -222,7 +222,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 11 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItCustomField.md b/docs/Get-SnipeItCustomField.md index acfd03e..b5d284b 100644 --- a/docs/Get-SnipeItCustomField.md +++ b/docs/Get-SnipeItCustomField.md @@ -28,38 +28,38 @@ Get-SnipeItCustomField -url "https://assets.example.com" -token "token..." ## PARAMETERS -### -id -A id of specific field +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 -Default value: 0 +Required: True +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -id +A id of specific field ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 2 -Default value: None +Required: False +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -67,7 +67,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItDepartment.md b/docs/Get-SnipeItDepartment.md index 55bcd56..1572f9f 100644 --- a/docs/Get-SnipeItDepartment.md +++ b/docs/Get-SnipeItDepartment.md @@ -39,47 +39,47 @@ Get-SnipeItDepartment -id 1 ## PARAMETERS -### -search -A text string to search the Departments data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Department +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 8 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Department ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -116,23 +116,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -{{ Fill sort Description }} +### -search +A text string to search the Departments data ```yaml Type: String @@ -140,29 +140,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: Created_at +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -sort +{{ Fill sort Description }} ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 7 -Default value: None +Required: False +Position: 6 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -170,7 +170,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItFieldset.md b/docs/Get-SnipeItFieldset.md index 5185c15..e5e17aa 100644 --- a/docs/Get-SnipeItFieldset.md +++ b/docs/Get-SnipeItFieldset.md @@ -33,38 +33,38 @@ Get-SnipeItFieldset -url "https://assets.example.com" -token "token..." | Where- ## PARAMETERS -### -id -A id of specific fieldset +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 1 -Default value: 0 +Required: True +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -id +A id of specific fieldset ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 2 -Default value: None +Required: False +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -72,7 +72,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItLicense.md b/docs/Get-SnipeItLicense.md index e0d1146..7be41ae 100644 --- a/docs/Get-SnipeItLicense.md +++ b/docs/Get-SnipeItLicense.md @@ -37,47 +37,47 @@ Get-SnipeItLicense -id 1 ## PARAMETERS -### -search -A text string to search the Licenses data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific License +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 19 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -{{ Fill name Description }} +### -category_id +{{ Fill category_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: None +Position: 13 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -97,23 +97,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -product_key -{{ Fill product_key Description }} +### -depreciation_id +{{ Fill depreciation_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: None +Position: 12 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -{{ Fill order_number Description }} +### -id +A id of specific License ```yaml Type: Int32 @@ -121,22 +121,22 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 2 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_order -{{ Fill purchase_order Description }} +### -license_email +{{ Fill license_email Description }} ```yaml -Type: String +Type: MailAddress Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -157,17 +157,19 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -license_email -{{ Fill license_email Description }} +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml -Type: MailAddress +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: None +Position: 16 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` @@ -187,23 +189,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -{{ Fill supplier_id Description }} +### -name +{{ Fill name Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 11 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -depreciation_id -{{ Fill depreciation_id Description }} +### -offset +Offset to use ```yaml Type: Int32 @@ -211,44 +213,44 @@ Parameter Sets: (All) Aliases: Required: False -Position: 12 +Position: 17 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -{{ Fill category_id Description }} +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 13 -Default value: 0 +Position: 14 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -order_number +{{ Fill order_number Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 14 -Default value: Desc +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -sort -{{ Fill sort Description }} +### -product_key +{{ Fill product_key Description }} ```yaml Type: String @@ -256,76 +258,74 @@ Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: Created_at +Position: 5 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -purchase_order +{{ Fill purchase_order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 16 -Default value: 50 +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -search +A text string to search the Licenses data ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 17 -Default value: 0 +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -sort +{{ Fill sort Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 15 +Default value: Created_at Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -supplier_id +{{ Fill supplier_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 18 -Default value: None +Required: False +Position: 11 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -333,7 +333,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 19 +Position: 18 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItLicenseSeat.md b/docs/Get-SnipeItLicenseSeat.md index db3221b..cc81450 100644 --- a/docs/Get-SnipeItLicenseSeat.md +++ b/docs/Get-SnipeItLicenseSeat.md @@ -29,31 +29,46 @@ Get-SnipeItLicenseSeat -id 1 ## PARAMETERS -### -id -A id of specific License +### -all +A return all results, works with -offset and other parameters ```yaml -Type: Int32 +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -seat_id -A id of specific seat +### -id +A id of specific License ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 2 +Required: True +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -91,17 +106,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -seat_id +A id of specific seat ```yaml -Type: SwitchParameter +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -121,21 +136,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Get-SnipeItManufacturer.md b/docs/Get-SnipeItManufacturer.md index fd87dd9..de28bf0 100644 --- a/docs/Get-SnipeItManufacturer.md +++ b/docs/Get-SnipeItManufacturer.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -38,47 +38,47 @@ Returns manufacturer with id 3 ## PARAMETERS -### -search -A text string to search the Manufactures data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Manufactuter +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Manufactuter ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -115,38 +115,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -search +A text string to search the Manufactures data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -154,7 +154,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItModel.md b/docs/Get-SnipeItModel.md index c534e60..6c74880 100644 --- a/docs/Get-SnipeItModel.md +++ b/docs/Get-SnipeItModel.md @@ -34,47 +34,47 @@ Get-SnipeItModel -id 1 ## PARAMETERS -### -search -A text string to search the Models data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific model +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific model ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -search +A text string to search the Models data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItStatus.md b/docs/Get-SnipeItStatus.md index ad5d2f5..a08bd6d 100644 --- a/docs/Get-SnipeItStatus.md +++ b/docs/Get-SnipeItStatus.md @@ -34,47 +34,47 @@ Get-SnipeItStatus -id 3 ## PARAMETERS -### -search -A text string to search the Status Labels data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Status Label +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Status Label ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -search +A text string to search the Status Labels data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItSupplier.md b/docs/Get-SnipeItSupplier.md index dd2fbd5..0413493 100644 --- a/docs/Get-SnipeItSupplier.md +++ b/docs/Get-SnipeItSupplier.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -34,47 +34,47 @@ Get-SnipeItSupplier -id 2 ## PARAMETERS -### -search -A text string to search the Supliers data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Suplier +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Suplier ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -search +A text string to search the Supliers data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeItUser.md b/docs/Get-SnipeItUser.md index b157893..7d643f4 100644 --- a/docs/Get-SnipeItUser.md +++ b/docs/Get-SnipeItUser.md @@ -1,4 +1,4 @@ ---- +--- external help file: SnipeItPS-help.xml Module Name: SnipeitPS online version: @@ -46,31 +46,31 @@ Get-SnipeItUser -email user@somedomain.com ## PARAMETERS -### -search -A text string to search the User data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific User +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 +Required: True +Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -91,8 +91,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -{{ Fill location_id Description }} +### -department_id +{{ Fill department_id Description }} ```yaml Type: Int32 @@ -100,29 +100,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -group_id -{{ Fill group_id Description }} +### -email +Search string for email field ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: 0 +Position: 8 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -department_id -{{ Fill department_id Description }} +### -group_id +{{ Fill group_id Description }} ```yaml Type: Int32 @@ -130,14 +130,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -username -Search string for username field +### -id +A id of specific User ```yaml Type: String @@ -145,46 +145,46 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -email -Search string for email field +### -limit +Specify the number of results you wish to return. +Defaults to 50. +Defines batch size for -all ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: None +Position: 10 +Default value: 50 Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -location_id +{{ Fill location_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: Desc +Position: 4 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -limit -Specify the number of results you wish to return. -Defaults to 50. -Defines batch size for -all +### -offset +Offset to use ```yaml Type: Int32 @@ -192,38 +192,38 @@ Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 50 +Position: 11 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -offset -Offset to use +### -order +{{ Fill order Description }} ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 11 -Default value: 0 +Position: 9 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -search +A text string to search the User data ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 1 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -243,16 +243,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -username +Search string for username field ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 13 +Required: False +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Get-SnipeitLocation.md b/docs/Get-SnipeitLocation.md index 920baac..2c7ed5b 100644 --- a/docs/Get-SnipeitLocation.md +++ b/docs/Get-SnipeitLocation.md @@ -34,47 +34,47 @@ Get-SnipeItLocation -id 3 ## PARAMETERS -### -search -A text string to search the Locations data +### -all +A return all results, works with -offset and other parameters ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False -Position: 1 -Default value: None +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -id -A id of specific Location +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: 0 +Required: True +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order -{{ Fill order Description }} +### -id +A id of specific Location ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: Desc +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -111,38 +111,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -all -A return all results, works with -offset and other parameters +### -order +{{ Fill order Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False -Position: Named -Default value: False +Position: 3 +Default value: Desc Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command +### -search +A text string to search the Locations data ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command ```yaml Type: String @@ -150,7 +150,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/New-SnipeItAsset.md b/docs/New-SnipeItAsset.md index 0f5a2c6..d4057f8 100644 --- a/docs/New-SnipeItAsset.md +++ b/docs/New-SnipeItAsset.md @@ -48,98 +48,84 @@ Using customfields when creating asset. ## PARAMETERS -### -status_id -Required Status ID of the asset, this can be got using Get-Status - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -model_id -Required Model ID of the asset, this can be got using Get-Model +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 2 -Default value: 0 +Position: 15 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Optional Name of the Asset +### -asset_tag +Asset Tag for the Asset, not required when snipe asset_tag autogeneration is on. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: tag Required: False -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_tag -Asset Tag for the Asset, not required when snipe asset_tag autogeneration is on. +### -company_id +Optional Company id ```yaml -Type: String +Type: Int32 Parameter Sets: (All) -Aliases: tag +Aliases: Required: False -Position: 4 -Default value: None +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -serial -Optional Serial number of the Asset +### -customfields +Hastable of custom fields and extra fields that need passing through to Snipeit. +Use internal field names from snipeit .You can use Get-CustomField to get internal field names. ```yaml -Type: String +Type: Hashtable Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 16 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -Optional Company id +### -model_id +Required Model ID of the asset, this can be got using Get-Model ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 6 +Required: True +Position: 2 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -Optional Order number +### -name +Optional Name of the Asset ```yaml Type: String @@ -147,7 +133,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -168,17 +154,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -warranty_months -{{ Fill warranty_months Description }} +### -order_number +Optional Order number ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -213,8 +199,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -{{ Fill supplier_id Description }} +### -rtd_location_id +Optional Default location id for the asset ```yaml Type: Int32 @@ -222,44 +208,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 12 +Position: 13 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -rtd_location_id -Optional Default location id for the asset +### -serial +Optional Serial number of the Asset ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 13 -Default value: 0 +Position: 5 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -status_id +Required Status ID of the asset, this can be got using Get-Status ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 14 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -supplier_id +{{ Fill supplier_id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -267,36 +268,34 @@ Parameter Sets: (All) Aliases: Required: True -Position: 15 +Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -customfields -Hastable of custom fields and extra fields that need passing through to Snipeit. -Use internal field names from snipeit .You can use Get-CustomField to get internal field names. +### -warranty_months +{{ Fill warranty_months Description }} ```yaml -Type: Hashtable +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 16 -Default value: None +Position: 9 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -305,13 +304,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItAssetMaintenance.md b/docs/New-SnipeItAssetMaintenance.md index 39c2272..f49bac6 100644 --- a/docs/New-SnipeItAssetMaintenance.md +++ b/docs/New-SnipeItAssetMaintenance.md @@ -31,23 +31,23 @@ New-SnipeItAssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" ## PARAMETERS -### -asset_id -Required ID of the asset, this can be got using Get-Asset +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 11 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -supplier_id -Required maintenance supplier +### -asset_id +Required ID of the asset, this can be got using Get-Asset ```yaml Type: Int32 @@ -55,7 +55,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -76,47 +76,32 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -title -Required Title of maintenance - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -start_date -Required start date +### -completion_date +{{ Fill completion_date Description }} ```yaml Type: DateTime Parameter Sets: (All) Aliases: -Required: True -Position: 5 +Required: False +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -completion_date -{{ Fill completion_date Description }} +### -cost +Optional cost ```yaml -Type: DateTime +Type: Decimal Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: None +Position: 8 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -136,38 +121,53 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -cost +### -notes Optional cost ```yaml -Type: Decimal +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 8 -Default value: 0 +Position: 9 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -Optional cost +### -start_date +Required start date ```yaml -Type: String +Type: DateTime Parameter Sets: (All) Aliases: -Required: False -Position: 9 +Required: True +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -supplier_id +Required maintenance supplier + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -title +Required Title of maintenance ```yaml Type: String @@ -175,14 +175,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 10 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -190,20 +190,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 11 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -212,13 +211,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItCategory.md b/docs/New-SnipeItCategory.md index a96c4fb..2d058df 100644 --- a/docs/New-SnipeItCategory.md +++ b/docs/New-SnipeItCategory.md @@ -29,8 +29,8 @@ New-SnipeItCategory -name "Laptops" -category_type asset -url "Snipe-IT URL here ## PARAMETERS -### -name -Name of new category to be created +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -38,7 +38,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -59,23 +59,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -checkin_email +If switch is present, send email to user on checkin/checkout ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: -Required: True -Position: 3 -Default value: None +Required: False +Position: Named +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -name +Name of new category to be created ```yaml Type: String @@ -83,14 +83,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 4 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -use_default_eula -If switch is present, use the primary default EULA +### -require_acceptance +If switch is present, require users to confirm acceptance of assets in this category ```yaml Type: SwitchParameter @@ -104,23 +104,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -require_acceptance -If switch is present, require users to confirm acceptance of assets in this category +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: Named -Default value: False +Required: True +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -checkin_email -If switch is present, send email to user on checkin/checkout +### -use_default_eula +If switch is present, use the primary default EULA ```yaml Type: SwitchParameter @@ -134,14 +134,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -150,13 +149,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItComponent.md b/docs/New-SnipeItComponent.md index 60910d3..2292692 100644 --- a/docs/New-SnipeItComponent.md +++ b/docs/New-SnipeItComponent.md @@ -30,8 +30,8 @@ An example ## PARAMETERS -### -name -Component name +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -39,7 +39,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -60,21 +60,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -qty -Quantity of the components you have - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -company_id {{ Fill company_id Description }} @@ -105,16 +90,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_date -Date accessory was purchased +### -name +Component name ```yaml -Type: DateTime +Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 6 +Required: True +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -135,8 +120,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -purchase_date +Date accessory was purchased + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -qty +Quantity of the components you have ```yaml Type: String @@ -144,14 +144,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -159,20 +159,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 9 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -181,13 +180,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItCustomField.md b/docs/New-SnipeItCustomField.md index 90f207a..b411e55 100644 --- a/docs/New-SnipeItCustomField.md +++ b/docs/New-SnipeItCustomField.md @@ -30,8 +30,8 @@ New-SnipeItCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "I ## PARAMETERS -### -Name -Name of the Custom Field +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -39,14 +39,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -HelpText -{{ Fill HelpText Description }} +### -CustomFormat +{{ Fill CustomFormat Description }} ```yaml Type: String @@ -54,7 +54,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -75,38 +75,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Format -{{ Fill Format Description }} +### -field_encrypted +{{ Fill field_encrypted Description }} ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: ANY +Position: 5 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -field_encrypted -{{ Fill field_encrypted Description }} +### -Format +{{ Fill Format Description }} ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: False +Position: 4 +Default value: ANY Accept pipeline input: False Accept wildcard characters: False ``` -### -CustomFormat -{{ Fill CustomFormat Description }} +### -HelpText +{{ Fill HelpText Description }} ```yaml Type: String @@ -114,14 +114,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -Name +Name of the Custom Field ```yaml Type: String @@ -129,14 +129,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -144,20 +144,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -166,13 +165,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItDepartment.md b/docs/New-SnipeItDepartment.md index 797b985..d582ff6 100644 --- a/docs/New-SnipeItDepartment.md +++ b/docs/New-SnipeItDepartment.md @@ -29,8 +29,8 @@ New-SnipeItDepartment -name "Department1" -company_id 1 -localtion_id 1 -manager ## PARAMETERS -### -name -Department Name +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -38,7 +38,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -89,38 +89,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -{{ Fill notes Description }} +### -name +Department Name ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -notes +{{ Fill notes Description }} ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 +Required: False +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -128,20 +128,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -150,13 +149,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItLicense.md b/docs/New-SnipeItLicense.md index 841736b..8de15ba 100644 --- a/docs/New-SnipeItLicense.md +++ b/docs/New-SnipeItLicense.md @@ -33,8 +33,8 @@ New-SnipeItLicence -name "License" -seats 3 -company_id 1 ## PARAMETERS -### -name -Name of license being created +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -42,27 +42,12 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 19 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -seats -Number of license seats owned. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -category_id {{ Fill category_id Description }} @@ -168,6 +153,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -name +Name of license being created + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -notes License Notes @@ -243,6 +243,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -seats +Number of license seats owned. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -serial Serialnumber of license @@ -303,16 +318,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: cf -Required: True -Position: 19 +Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -334,21 +349,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/New-SnipeItLocation.md b/docs/New-SnipeItLocation.md index 8f5f31f..d2c35e9 100644 --- a/docs/New-SnipeItLocation.md +++ b/docs/New-SnipeItLocation.md @@ -30,21 +30,6 @@ New-SnipeItLocation -name "Room 1" -address "123 Asset Street" -parent_id 14 ## PARAMETERS -### -name -Name of the Location - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -address Address line 1 of the location @@ -75,16 +60,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -state -Address State of the location +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 4 +Required: True +Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -105,8 +90,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -zip -The zip code of the location +### -ldap_ou +The LDAP OU of the location ```yaml Type: String @@ -114,14 +99,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -parent_id -Parent location ID for the location +### -manager_id +The manager ID of the location ```yaml Type: Int32 @@ -129,14 +114,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 8 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manager_id -The manager ID of the location +### -name +Name of the Location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -parent_id +Parent location ID for the location ```yaml Type: Int32 @@ -144,14 +144,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 7 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -ldap_ou -The LDAP OU of the location +### -state +Address State of the location ```yaml Type: String @@ -159,7 +159,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -180,29 +180,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -zip +The zip code of the location ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 11 +Required: False +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -211,13 +210,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItManufacturer.md b/docs/New-SnipeItManufacturer.md index 50cd5e9..dc9236d 100644 --- a/docs/New-SnipeItManufacturer.md +++ b/docs/New-SnipeItManufacturer.md @@ -29,8 +29,8 @@ New-SnipeItManufacturer -name "HP" ## PARAMETERS -### -Name -Name of the Manufacturer +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -38,14 +38,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -Name +Name of the Manufacturer ```yaml Type: String @@ -53,14 +53,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -68,20 +68,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -90,13 +89,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItModel.md b/docs/New-SnipeItModel.md index 105f39b..24d2ecc 100644 --- a/docs/New-SnipeItModel.md +++ b/docs/New-SnipeItModel.md @@ -30,8 +30,8 @@ New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 ## PARAMETERS -### -name -Name of the Asset Model +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -39,44 +39,44 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -model_number -Model number of the Asset Model +### -category_id +Category ID that the asset belongs to this can be got using Get-Category ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 2 -Default value: None +Required: True +Position: 3 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -Category ID that the asset belongs to this can be got using Get-Category +### -eol +{{ Fill eol Description }} ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 3 +Required: False +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer +### -fieldset_id +Fieldset ID that the asset uses (Custom fields) ```yaml Type: Int32 @@ -84,44 +84,44 @@ Parameter Sets: (All) Aliases: Required: True -Position: 4 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -eol -{{ Fill eol Description }} +### -manufacturer_id +Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -fieldset_id -Fieldset ID that the asset uses (Custom fields) +### -model_number +Model number of the Asset Model ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 6 -Default value: 0 +Required: False +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -name +Name of the Asset Model ```yaml Type: String @@ -129,14 +129,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -144,20 +144,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -166,13 +165,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/New-SnipeItUser.md b/docs/New-SnipeItUser.md index 07eb6be..dd563e9 100644 --- a/docs/New-SnipeItUser.md +++ b/docs/New-SnipeItUser.md @@ -34,23 +34,23 @@ Creates new a new user who can't login to system ## PARAMETERS -### -first_name -Users first name +### -activated +{{ Fill activated Description }} ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: -Required: True -Position: 1 -Default value: None +Required: False +Position: 5 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -last_name -Users last name +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -58,59 +58,59 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 17 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -username -Username for user +### -company_id +ID number of company users belogs to ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 3 -Default value: None +Required: False +Position: 10 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -password -{{ Fill password Description }} +### -department_id +ID number of department ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: None +Position: 12 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -activated -{{ Fill activated Description }} +### -email +email address ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: False +Position: 8 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -User Notes +### -employee_num +Employeenumber ```yaml Type: String @@ -118,29 +118,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -jobtitle -Users job tittle +### -first_name +Users first name ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 7 +Required: True +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -email -email address +### -jobtitle +Users job tittle ```yaml Type: String @@ -148,38 +148,38 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -phone -Phone number +### -last_name +Users last name ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 9 +Required: True +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -ID number of company users belogs to +### -ldap_import +Mark user as import from ldap ```yaml -Type: Int32 +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 0 +Position: 15 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` @@ -199,8 +199,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -department_id -ID number of department +### -manager_id +ID number of manager ```yaml Type: Int32 @@ -208,29 +208,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 12 +Position: 13 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manager_id -ID number of manager +### -notes +User Notes ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 13 -Default value: 0 +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -employee_num -Employeenumber +### -password +{{ Fill password Description }} ```yaml Type: String @@ -238,23 +238,23 @@ Parameter Sets: (All) Aliases: Required: False -Position: 14 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ldap_import -Mark user as import from ldap +### -phone +Phone number ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: False +Position: 9 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -274,8 +274,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -username +Username for user ```yaml Type: String @@ -283,20 +283,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 17 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -305,13 +304,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Remove-SnipeItAsset.md b/docs/Remove-SnipeItAsset.md index 8ac679c..a79edcc 100644 --- a/docs/Remove-SnipeItAsset.md +++ b/docs/Remove-SnipeItAsset.md @@ -28,38 +28,38 @@ Remove-SnipeItAsset -ID 44 -Verbose ## PARAMETERS -### -ID -Unique ID For Asset to be removed +### -APIKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -URL -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -ID +Unique ID For Asset to be removed ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 2 -Default value: None +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -APIKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -URL +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -67,20 +67,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -89,13 +88,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Remove-SnipeItUser.md b/docs/Remove-SnipeItUser.md index 891ffd5..22d52a1 100644 --- a/docs/Remove-SnipeItUser.md +++ b/docs/Remove-SnipeItUser.md @@ -28,8 +28,8 @@ Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose ## PARAMETERS -### -ID -Unique ID For User to be removed +### -APIKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -37,14 +37,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -URL -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -ID +Unique ID For User to be removed ```yaml Type: String @@ -52,14 +52,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -APIKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -URL +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -67,20 +67,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -89,13 +88,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeItAccessory.md b/docs/Set-SnipeItAccessory.md index 06e039a..3b10b76 100644 --- a/docs/Set-SnipeItAccessory.md +++ b/docs/Set-SnipeItAccessory.md @@ -31,38 +31,38 @@ Set-SnipeItAccessory -id 1 -qty 3 ## PARAMETERS -### -id -{{ Fill id Description }} +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 13 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -ID number of Accessory on Snipe-It system +### -category_id +ID number of the category the accessory belongs to ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: None +Position: 4 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -qty -Quantity of the accessory you have +### -company_id +ID Number of the company the accessory is assigned to ```yaml Type: Int32 @@ -70,29 +70,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -ID number of the category the accessory belongs to +### -id +{{ Fill id Description }} ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 4 +Required: True +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -ID Number of the company the accessory is assigned to +### -manufacturer_id +ID number of the manufacturer for this accessory. ```yaml Type: Int32 @@ -100,23 +100,38 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -ID number of the manufacturer for this accessory. +### -min_qty +Min quantity of the accessory before alert is triggered ```yaml -Type: Int32 +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: 0 +Position: 10 +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +ID number of Accessory on Snipe-It system + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -166,17 +181,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -min_qty -Min quantity of the accessory before alert is triggered +### -qty +Quantity of the accessory you have ```yaml -Type: Boolean +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: False +Position: 3 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -211,16 +226,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: cf -Required: True -Position: 13 +Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -242,21 +257,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Set-SnipeItAsset.md b/docs/Set-SnipeItAsset.md index 4ad339a..d199e77 100644 --- a/docs/Set-SnipeItAsset.md +++ b/docs/Set-SnipeItAsset.md @@ -37,113 +37,114 @@ Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = ## PARAMETERS -### -id -ID of the Asset +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 17 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -Asset name +### -archived +Whether or not the asset is archived. +Archived assets cannot be checked out and do not show up in the deployable asset screens ```yaml -Type: String +Type: Boolean Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: None +Position: 14 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -Status_id -Status ID of the asset, this can be got using Get-Status +### -assigned_to +The id of the user the asset is currently checked out to ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: None +Position: 6 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -Model_id -Model ID of the asset, this can be got using Get-Model +### -company_id +The id of an associated company id ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: None +Position: 7 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -last_checkout -Date the asset was last checked out +### -customfields +Hastable of custom fields and extra fields that need passing through to Snipeit ```yaml -Type: DateTime +Type: Hashtable Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 18 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -assigned_to -The id of the user the asset is currently checked out to +### -id +ID of the Asset ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 6 +Required: True +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -The id of an associated company id +### -last_checkout +Date the asset was last checked out ```yaml -Type: Int32 +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: 0 +Position: 5 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -serial -Serial number of the asset +### -Model_id +Model ID of the asset, this can be got using Get-Model ```yaml Type: String @@ -151,14 +152,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -order_number -Order number for the asset +### -Name +Asset name ```yaml Type: String @@ -166,23 +167,23 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -warranty_months -Number of months for the asset warranty +### -order_number +Order number for the asset ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 0 +Position: 9 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -232,54 +233,53 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -archived -Whether or not the asset is archived. -Archived assets cannot be checked out and do not show up in the deployable asset screens +### -rtd_location_id +The id that corresponds to the location where the asset is usually located when not checked out ```yaml -Type: Boolean +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 14 -Default value: False +Position: 15 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -rtd_location_id -The id that corresponds to the location where the asset is usually located when not checked out +### -serial +Serial number of the asset ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 15 -Default value: 0 +Position: 8 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command +### -Status_id +Status ID of the asset, this can be got using Get-Status ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 16 +Required: False +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command ```yaml Type: String @@ -287,35 +287,34 @@ Parameter Sets: (All) Aliases: Required: True -Position: 17 +Position: 16 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -customfields -Hastable of custom fields and extra fields that need passing through to Snipeit +### -warranty_months +Number of months for the asset warranty ```yaml -Type: Hashtable +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 18 -Default value: None +Position: 10 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -324,13 +323,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeItAssetOwner.md b/docs/Set-SnipeItAssetOwner.md index 1d0dc2c..3b87adb 100644 --- a/docs/Set-SnipeItAssetOwner.md +++ b/docs/Set-SnipeItAssetOwner.md @@ -30,17 +30,17 @@ Set-SnipeItAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing ## PARAMETERS -### -id -Unique ID For asset to checkout +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 9 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -60,26 +60,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -checkout_to_type -{{ Fill checkout_to_type Description }} +### -checkout_at +Optional date to override the checkout time of now ```yaml -Type: String +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: User +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Optional new asset name. -This is useful for changing the asset's name on new checkout, -for example, an asset that was named "Anna's Macbook Pro" could be renamed on the fly -when it's checked out to Elizabeth, to "Beth's Macbook Pro" +### -checkout_to_type +{{ Fill checkout_to_type Description }} ```yaml Type: String @@ -87,74 +84,77 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: None +Position: 3 +Default value: User Accept pipeline input: False Accept wildcard characters: False ``` -### -note -Notes about checkout +### -expected_checkin +Optional date the asset is expected to be checked in ```yaml -Type: String +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -expected_checkin -Optional date the asset is expected to be checked in +### -id +Unique ID For asset to checkout ```yaml -Type: DateTime +Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 6 -Default value: None +Required: True +Position: 1 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -checkout_at -Optional date to override the checkout time of now +### -name +Optional new asset name. +This is useful for changing the asset's name on new checkout, +for example, an asset that was named "Anna's Macbook Pro" could be renamed on the fly +when it's checked out to Elizabeth, to "Beth's Macbook Pro" ```yaml -Type: DateTime +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -note +Notes about checkout ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 8 +Required: False +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -162,20 +162,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 9 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -184,13 +183,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeItComponent.md b/docs/Set-SnipeItComponent.md index 52d0154..13aeb56 100644 --- a/docs/Set-SnipeItComponent.md +++ b/docs/Set-SnipeItComponent.md @@ -30,8 +30,8 @@ An example ## PARAMETERS -### -id -ID number of name +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -39,44 +39,44 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -qty -Quantity of the components you have +### -company_id +{{ Fill company_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 2 -Default value: None +Required: False +Position: 4 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Component name +### -id +ID number of name ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 3 +Required: True +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -{{ Fill company_id Description }} +### -location_id +ID number of the location the accessory is assigned to ```yaml Type: Int32 @@ -84,59 +84,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -ID number of the location the accessory is assigned to +### -name +Component name ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 5 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_date -Date accessory was purchased +### -purchase_cost +Cost of item being purchased. ```yaml -Type: DateTime +Type: Single Parameter Sets: (All) Aliases: Required: False -Position: 6 -Default value: None +Position: 7 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -purchase_cost -Cost of item being purchased. +### -purchase_date +Date accessory was purchased ```yaml -Type: Single +Type: DateTime Parameter Sets: (All) Aliases: Required: False -Position: 7 -Default value: 0 +Position: 6 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -qty +Quantity of the components you have ```yaml Type: String @@ -144,14 +144,14 @@ Parameter Sets: (All) Aliases: Required: True -Position: 8 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -159,20 +159,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 9 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -181,13 +180,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeItInfo.md b/docs/Set-SnipeItInfo.md index 5f7c4bb..5af19dd 100644 --- a/docs/Set-SnipeItInfo.md +++ b/docs/Set-SnipeItInfo.md @@ -28,31 +28,31 @@ Set-SnipeItInfo -url $url -apiKey -Verbose ## PARAMETERS -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Uri +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml -Type: String +Type: Uri Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Set-SnipeItLicense.md b/docs/Set-SnipeItLicense.md index 13416fb..8dfa8cc 100644 --- a/docs/Set-SnipeItLicense.md +++ b/docs/Set-SnipeItLicense.md @@ -33,51 +33,21 @@ Set-SnipeItLicence -name "License" -seats 3 -company_id 1 ## PARAMETERS -### -id -ID number of licence - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -name -Name of license +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 +Required: True +Position: 20 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -seats -Number of license seats owned. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -category_id {{ Fill category_id Description }} @@ -123,6 +93,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -id +ID number of licence + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -license_email Email address associated with license @@ -183,6 +168,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -name +Name of license + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -notes License Notes @@ -258,6 +258,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -seats +Number of license seats owned. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -serial Serialnumber of license @@ -318,16 +333,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: cf -Required: True -Position: 20 +Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -349,21 +364,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Set-SnipeItLicenseSeat.md b/docs/Set-SnipeItLicenseSeat.md index 3620715..0bbca1a 100644 --- a/docs/Set-SnipeItLicenseSeat.md +++ b/docs/Set-SnipeItLicenseSeat.md @@ -38,31 +38,31 @@ Checkout licence to asset id 3 ## PARAMETERS -### -id -Unique ID For asset to checkout +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 7 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -seat_id -{{ Fill seat_id Description }} +### -asset_id +Id of target asset ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: True -Position: 2 +Required: False +Position: 4 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -83,16 +83,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -asset_id -Id of target asset +### -id +Unique ID For asset to checkout ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 4 +Required: True +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -113,23 +113,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -seat_id +{{ Fill seat_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True -Position: 6 -Default value: None +Position: 2 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -137,20 +137,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 7 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -159,13 +158,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeItModel.md b/docs/Set-SnipeItModel.md index 40c5277..816f4e0 100644 --- a/docs/Set-SnipeItModel.md +++ b/docs/Set-SnipeItModel.md @@ -30,53 +30,53 @@ New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1 ## PARAMETERS -### -id -ID number of the Asset Model +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: True -Position: 1 -Default value: 0 +Position: 9 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -name -Name of the Asset Model +### -category_id +Category ID that the asset belongs to this can be got using Get-Category ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 2 -Default value: None +Position: 4 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -model_number -Model number of the Asset Model +### -custom_fieldset_id +{{ Fill custom_fieldset_id Description }} ```yaml -Type: String +Type: Int32 Parameter Sets: (All) -Aliases: +Aliases: fieldset_id Required: False -Position: 3 -Default value: None +Position: 7 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -category_id -Category ID that the asset belongs to this can be got using Get-Category +### -eol +{{ Fill eol Description }} ```yaml Type: Int32 @@ -84,29 +84,29 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 6 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -manufacturer_id -Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer +### -id +ID number of the Asset Model ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -eol -{{ Fill eol Description }} +### -manufacturer_id +Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer ```yaml Type: Int32 @@ -114,44 +114,44 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 5 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -custom_fieldset_id -{{ Fill custom_fieldset_id Description }} +### -model_number +Model number of the Asset Model ```yaml -Type: Int32 +Type: String Parameter Sets: (All) -Aliases: fieldset_id +Aliases: Required: False -Position: 7 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -url -URL of Snipeit system, can be set using Set-SnipeItInfo command +### -name +Name of the Asset Model ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 8 +Required: False +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command ```yaml Type: String @@ -159,20 +159,19 @@ Parameter Sets: (All) Aliases: Required: True -Position: 9 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -181,13 +180,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeItUser.md b/docs/Set-SnipeItUser.md index 4bf1538..1b2f9e1 100644 --- a/docs/Set-SnipeItUser.md +++ b/docs/Set-SnipeItUser.md @@ -34,68 +34,68 @@ Updates user with id 3 ## PARAMETERS -### -id -{{ Fill id Description }} +### -activated +{{ Fill activated Description }} ```yaml -Type: Int32 +Type: Boolean Parameter Sets: (All) Aliases: -Required: True -Position: 1 -Default value: 0 +Required: False +Position: 13 +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` -### -first_name -Users first name +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 2 +Required: True +Position: 16 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -last_name -Users last name +### -company_id +ID number of company users belogs to ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 3 -Default value: None +Position: 8 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -userName -Username for user +### -department_id +ID number of department ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 4 -Default value: None +Position: 10 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -jobtitle -Users job tittle +### -email +email address ```yaml Type: String @@ -103,14 +103,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -email -email address +### -employee_num +Employeenumber ```yaml Type: String @@ -118,14 +118,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 12 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -phone -Phone number +### -first_name +Users first name ```yaml Type: String @@ -133,59 +133,59 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -company_id -ID number of company users belogs to +### -id +{{ Fill id Description }} ```yaml Type: Int32 Parameter Sets: (All) Aliases: -Required: False -Position: 8 +Required: True +Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -location_id -ID number of localtion +### -jobtitle +Users job tittle ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 9 -Default value: 0 +Position: 5 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -department_id -ID number of department +### -last_name +Users last name ```yaml -Type: Int32 +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 10 -Default value: 0 +Position: 3 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -manager_id -ID number of manager +### -location_id +ID number of localtion ```yaml Type: Int32 @@ -193,44 +193,44 @@ Parameter Sets: (All) Aliases: Required: False -Position: 11 +Position: 9 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -employee_num -Employeenumber +### -manager_id +ID number of manager ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False -Position: 12 -Default value: None +Position: 11 +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` -### -activated -{{ Fill activated Description }} +### -notes +User Notes ```yaml -Type: Boolean +Type: String Parameter Sets: (All) Aliases: Required: False -Position: 13 -Default value: False +Position: 14 +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -notes -User Notes +### -phone +Phone number ```yaml Type: String @@ -238,7 +238,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 14 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -259,29 +259,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -User's API Key for Snipeit, can be set using Set-SnipeItInfo command +### -userName +Username for user ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 16 +Required: False +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -290,13 +289,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/Set-SnipeitLocation.md b/docs/Set-SnipeitLocation.md index 6f22496..8c9a0da 100644 --- a/docs/Set-SnipeitLocation.md +++ b/docs/Set-SnipeitLocation.md @@ -30,36 +30,6 @@ Set-SnipeitLocation -id 123 -name "Some storage" -parent_id 100 ## PARAMETERS -### -id -{{ Fill id Description }} - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -name -Name of Location - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -address Address line 1 @@ -90,16 +60,16 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -state -Address State +### -apiKey +Users API Key for Snipeit, can be set using Set-SnipeItInfo command ```yaml Type: String Parameter Sets: (All) Aliases: -Required: False -Position: 5 +Required: True +Position: 12 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -120,8 +90,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -zip -Address zipcode +### -id +{{ Fill id Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ldap_ou +LDAP OU of Location ```yaml Type: String @@ -129,7 +114,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -150,8 +135,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ldap_ou -LDAP OU of Location +### -name +Name of Location ```yaml Type: String @@ -159,7 +144,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -180,6 +165,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -state +Address State + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -url URL of Snipeit system, can be set using Set-SnipeItInfo command @@ -195,29 +195,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -apiKey -Users API Key for Snipeit, can be set using Set-SnipeItInfo command +### -zip +Address zipcode ```yaml Type: String Parameter Sets: (All) Aliases: -Required: True -Position: 12 +Required: False +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +### -Confirm +Prompts you for confirmation before running the cmdlet. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: wi +Aliases: cf Required: False Position: Named @@ -226,13 +225,14 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: cf +Aliases: wi Required: False Position: Named diff --git a/docs/SnipeItPS.md b/docs/SnipeItPS.md index 256e56d..2189f2f 100644 --- a/docs/SnipeItPS.md +++ b/docs/SnipeItPS.md @@ -12,122 +12,113 @@ Locale: en-US ## SnipeitPS Cmdlets ### [Get-SnipeItAccessory](Get-SnipeItAccessory.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Accessories ### [Get-SnipeItAsset](Get-SnipeItAsset.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Assets or specific asset ### [Get-SnipeItAssetMaintenance](Get-SnipeItAssetMaintenance.md) -{{ Fill in the Description }} +Lists Snipe-it Assets Maintenances ### [Get-SnipeItCategory](Get-SnipeItCategory.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Categories ### [Get-SnipeItCompany](Get-SnipeItCompany.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Companies ### [Get-SnipeItComponent](Get-SnipeItComponent.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Components ### [Get-SnipeItCustomField](Get-SnipeItCustomField.md) -{{ Fill in the Description }} +Returns specific Snipe-IT custom field or a list of all custom field ### [Get-SnipeItDepartment](Get-SnipeItDepartment.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Departments ### [Get-SnipeItFieldset](Get-SnipeItFieldset.md) -{{ Fill in the Description }} +Returns a fieldset or list of Snipe-it Fieldsets ### [Get-SnipeItLicense](Get-SnipeItLicense.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Licenses ### [Get-SnipeItLicenseSeat](Get-SnipeItLicenseSeat.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Licenses Seats or specific Seat ### [Get-SnipeitLocation](Get-SnipeitLocation.md) -{{ Fill in the Description }} - -### [Get-SnipeItManufacturer](Get-SnipeItManufacturer.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Locations ### [Get-SnipeItModel](Get-SnipeItModel.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Models ### [Get-SnipeItStatus](Get-SnipeItStatus.md) -{{ Fill in the Description }} - -### [Get-SnipeItSupplier](Get-SnipeItSupplier.md) -{{ Fill in the Description }} - -### [Get-SnipeItUser](Get-SnipeItUser.md) -{{ Fill in the Description }} +Gets a list of Snipe-it Status Labels ### [New-SnipeItAsset](New-SnipeItAsset.md) -{{ Fill in the Description }} +Add a new Asset to Snipe-it asset system ### [New-SnipeItAssetMaintenance](New-SnipeItAssetMaintenance.md) -{{ Fill in the Description }} +Add a new Asset maintenence to Snipe-it asset system ### [New-SnipeItCategory](New-SnipeItCategory.md) -{{ Fill in the Description }} +Create a new Snipe-IT Category ### [New-SnipeItComponent](New-SnipeItComponent.md) -{{ Fill in the Description }} +Create a new component ### [New-SnipeItCustomField](New-SnipeItCustomField.md) -{{ Fill in the Description }} +Add a new Custom Field to Snipe-it asset system ### [New-SnipeItDepartment](New-SnipeItDepartment.md) -{{ Fill in the Description }} +Creates a department ### [New-SnipeItLicense](New-SnipeItLicense.md) -{{ Fill in the Description }} +Creates a licence ### [New-SnipeItLocation](New-SnipeItLocation.md) -{{ Fill in the Description }} +Add a new Location to Snipe-it asset system ### [New-SnipeItManufacturer](New-SnipeItManufacturer.md) -{{ Fill in the Description }} +Add a new Manufacturer to Snipe-it asset system ### [New-SnipeItModel](New-SnipeItModel.md) -{{ Fill in the Description }} +Add a new Model to Snipe-it asset system ### [New-SnipeItUser](New-SnipeItUser.md) -{{ Fill in the Description }} +Creates a new user ### [Remove-SnipeItAsset](Remove-SnipeItAsset.md) -{{ Fill in the Description }} +Removes Asset from Snipe-it asset system ### [Remove-SnipeItUser](Remove-SnipeItUser.md) -{{ Fill in the Description }} +Removes User from Snipe-it asset system ### [Set-SnipeItAccessory](Set-SnipeItAccessory.md) -{{ Fill in the Description }} +Updates accessory on Snipe-It system ### [Set-SnipeItAsset](Set-SnipeItAsset.md) -{{ Fill in the Description }} +Update a specific Asset in the Snipe-it asset system ### [Set-SnipeItAssetOwner](Set-SnipeItAssetOwner.md) -{{ Fill in the Description }} +Checkout asset ### [Set-SnipeItComponent](Set-SnipeItComponent.md) -{{ Fill in the Description }} +Updates component ### [Set-SnipeItInfo](Set-SnipeItInfo.md) -{{ Fill in the Description }} +Sets authetication information ### [Set-SnipeItLicense](Set-SnipeItLicense.md) -{{ Fill in the Description }} +Updates a licence ### [Set-SnipeItLicenseSeat](Set-SnipeItLicenseSeat.md) -{{ Fill in the Description }} +Set license seat or checkout license seat ### [Set-SnipeitLocation](Set-SnipeitLocation.md) -{{ Fill in the Description }} +Updates Location in Snipe-it asset system ### [Set-SnipeItModel](Set-SnipeItModel.md) -{{ Fill in the Description }} +Updates Model on Snipe-it asset system ### [Set-SnipeItUser](Set-SnipeItUser.md) -{{ Fill in the Description }} +Creates a new user From 906fedd71ad568ce53e560765d5c268b2bfcb85f Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Mon, 24 May 2021 10:53:27 +0300 Subject: [PATCH 14/17] Helper function to update existing SnipeItPS scripts --- SnipeitPS/Private/Get-SnipeItAlias.ps1 | 38 +++++++++++++++++++++ SnipeitPS/Private/Set-SnipeItAlias.ps1 | 43 +++--------------------- SnipeitPS/Private/Test-SnipeItAlias.ps1 | 2 ++ SnipeitPS/Public/Update-SnipeItAlias.ps1 | 36 ++++++++++++++++++++ SnipeitPS/SnipeItPS.psd1 | 4 ++- SnipeitPS/SnipeItPS.psm1 | 38 +++++++++++++++++++++ 6 files changed, 121 insertions(+), 40 deletions(-) create mode 100644 SnipeitPS/Private/Get-SnipeItAlias.ps1 create mode 100644 SnipeitPS/Public/Update-SnipeItAlias.ps1 diff --git a/SnipeitPS/Private/Get-SnipeItAlias.ps1 b/SnipeitPS/Private/Get-SnipeItAlias.ps1 new file mode 100644 index 0000000..08218d6 --- /dev/null +++ b/SnipeitPS/Private/Get-SnipeItAlias.ps1 @@ -0,0 +1,38 @@ + Function Get-SnipeItAlias(){ + @{'Get-Asset' = 'Get-SnipeItAsset'; + 'Get-AssetMaintenance' = 'Get-SnipeItAssetMaintenance'; + 'Get-Category' = 'Get-SnipeItCategory'; + 'Get-Company' = 'Get-SnipeItCompany'; + 'Get-Component' = 'Get-SnipeItCompany'; + 'Get-CustomField' = 'Get-SnipeItCustomField'; + 'Get-Department' = 'Get-SnipeItDepartment'; + 'Get-Fieldset' = 'Get-SnipeItFieldset'; + 'Get-Manufacturer' = 'Get-SnipeItManufacturer'; + 'Get-Model' = 'Get-SnipeItModel'; + 'Get-Status' = 'Get-SnipeItStatus'; + 'Get-Supplier' = 'Get-SnipeItSupplier'; + 'Get-User' = 'Get-SnipeItUser'; + 'New-Asset' = 'New-SnipeItAsset'; + 'New-AssetMaintenance' = 'New-SnipeItAssetMaintenance'; + 'New-Category' = 'New-SnipeItCategory'; + 'New-Component' = 'New-SnipeItComponent'; + 'New-CustomField' = 'New-SnipeItCustomField'; + 'New-Department' = 'New-SnipeItDepartment'; + 'New-License' = 'New-SnipeItLicense'; + 'Set-License' = 'Set-SnipeItLicense'; + 'New-Location' = 'New-SnipeItLocation'; + 'New-Manufacturer' = 'New-SnipeItManufacturer'; + 'New-Model' = 'New-SnipeItModel'; + 'New-User' = 'New-SnipeItUser'; + 'Set-Asset' = 'Set-SnipeItAsset'; + 'Set-AssetOwner' = 'Set-SnipeItAssetOwner'; + 'Set-Component' = 'Set-SnipeItComponent'; + 'Set-Model' = 'Set-SnipeItModel'; + 'Set-Info' = 'Set-SnipeItInfo'; + 'Set-User' = 'Set-SnipeItUser'; + 'New-Accessory' = 'New-SnipeItAccessory'; + 'Set-Accessory' = 'Set-SnipeItAccessory'; + 'Get-Accessory' = 'Get-SnipeItAccessory'; + 'Remove-Asset' = 'Remove-SnipeItAsset'; + 'Remove-User' = 'Remove-SnipeItUser';} +} diff --git a/SnipeitPS/Private/Set-SnipeItAlias.ps1 b/SnipeitPS/Private/Set-SnipeItAlias.ps1 index 26cc63d..899f316 100644 --- a/SnipeitPS/Private/Set-SnipeItAlias.ps1 +++ b/SnipeitPS/Private/Set-SnipeItAlias.ps1 @@ -6,46 +6,11 @@ function Set-SnipeItAlias() )] param() Write-Verbose "Setting compatibility aliases.. " - $aliases= @{'Get-Asset' = 'Get-SnipeItAsset'; - 'Get-AssetMaintenance' = 'Get-SnipeItAssetMaintenance'; - 'Get-Category' = 'Get-SnipeItCategory'; - 'Get-Company' = 'Get-SnipeItCompany'; - 'Get-Component' = 'Get-SnipeItCompany'; - 'Get-CustomField' = 'Get-SnipeItCustomField'; - 'Get-Department' = 'Get-SnipeItDepartment'; - 'Get-Fieldset' = 'Get-SnipeItFieldset'; - 'Get-Manufacturer' = 'Get-SnipeItManufacturer'; - 'Get-Model' = 'Get-SnipeItModel'; - 'Get-Status' = 'Get-SnipeItStatus'; - 'Get-Supplier' = 'Get-SnipeItSupplier'; - 'Get-User' = 'Get-SnipeItUser'; - 'New-Asset' = 'New-SnipeItAsset'; - 'New-AssetMaintenance' = 'New-SnipeItAssetMaintenance'; - 'New-Category' = 'New-SnipeItCategory'; - 'New-Component' = 'New-SnipeItComponent'; - 'New-CustomField' = 'New-SnipeItCustomField'; - 'New-Department' = 'New-SnipeItDepartment'; - 'New-License' = 'New-SnipeItLicense'; - 'Set-License' = 'Set-SnipeItLicense'; - 'New-Location' = 'New-SnipeItLocation'; - 'New-Manufacturer' = 'New-SnipeItManufacturer'; - 'New-Model' = 'New-SnipeItModel'; - 'New-User' = 'New-SnipeItUser'; - 'Set-Asset' = 'Set-SnipeItAsset'; - 'Set-AssetOwner' = 'Set-SnipeItAssetOwner'; - 'Set-Component' = 'Set-SnipeItComponent'; - 'Set-Model' = 'Set-SnipeItModel'; - 'Set-Info' = 'Set-SnipeItInfo'; - 'Set-User' = 'Set-SnipeItUser'; - 'New-Accessory' = 'New-SnipeItAccessory'; - 'Set-Accessory' = 'Set-SnipeItAccessory'; - 'Get-Accessory' = 'Get-SnipeItAccessory'; - 'Remove-Asset' = 'Remove-SnipeItAsset'; - 'Remove-User' = 'Remove-SnipeItUser';} Write-Verbose "All aliases are deprediated." - ForEach ($key in $aliases.Keys ) { - New-Alias -Name $key -Value $($aliases[$key]) -Scope 1 - Write-Verbose ("{0,5} -> {1}" -f $key,$($aliases[$key])) + $SnipeItAliases = get-SnipeItAlias + ForEach ($key in $SnipeItAliases.Keys ) { + New-Alias -Name $key -Value $($SnipeItAliases[$key]) -Scope 1 + Write-Verbose ("{0,5} -> {1}" -f $key,$($SnipeItAliases[$key])) } Write-Verbose "Please start using native 'SnipeIt' prfixed functions instead." Get-Command -Module SnipeItPS -CommandType Alias | Select-Object -Property DisplayName,ResolvedCommand diff --git a/SnipeitPS/Private/Test-SnipeItAlias.ps1 b/SnipeitPS/Private/Test-SnipeItAlias.ps1 index 2aee0f4..0664cb7 100644 --- a/SnipeitPS/Private/Test-SnipeItAlias.ps1 +++ b/SnipeitPS/Private/Test-SnipeItAlias.ps1 @@ -9,5 +9,7 @@ function Test-SnipeItAlias() ) if($invocationName -ne $commandName) { Write-Warning "$invocationName is still working, but it has been superceded by $commandName, please use it instead." + Write-Warning 'To update your scripts you can use Update-SnipeItAlias helper function: ' + Write-Warning '"Get-Content [your-script.ps1] | Update-SnipeItAlias | Out-File [new-script-name.ps1]"' } } diff --git a/SnipeitPS/Public/Update-SnipeItAlias.ps1 b/SnipeitPS/Public/Update-SnipeItAlias.ps1 new file mode 100644 index 0000000..dcc23bf --- /dev/null +++ b/SnipeitPS/Public/Update-SnipeItAlias.ps1 @@ -0,0 +1,36 @@ +function Update-SnipeItAlias() +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Low" + )] + param( + [Parameter(Mandatory = $true, + ValueFromPipeline = $true)] + [string[]] + $String + ) + begin{ + Write-Verbose "Replacing old SnipeIt fuctions with new ones.. " + $SnipeItAliases = Get-SnipeItAlias + + } + process { + If ($PSCmdlet.ShouldProcess("ShouldProcess?")) { + ForEach ($st in $String){ + $result = $st + ForEach ($key in $SnipeItAliases.Keys ) { + #Write-Verbose "Replacing $key with $($SnipeItAliases[$key])" + $result = $result -replace $key, $SnipeItAliases[$key] + } + $result + } + } + } + end{ + Write-Verbose "..replacing done 1 " + } + + + +} diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index fa1464e..0a7186b 100644 --- a/SnipeitPS/SnipeItPS.psd1 +++ b/SnipeitPS/SnipeItPS.psd1 @@ -110,7 +110,9 @@ FunctionsToExport = @( 'Set-SnipeItAccessory', 'Get-SnipeItAccessory', 'Remove-SnipeItAsset', - 'Remove-SnipeItUser' + 'Remove-SnipeItUser', + 'Update-SnipeItAlias' + ) # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. diff --git a/SnipeitPS/SnipeItPS.psm1 b/SnipeitPS/SnipeItPS.psm1 index 783e814..e85ba63 100644 --- a/SnipeitPS/SnipeItPS.psm1 +++ b/SnipeitPS/SnipeItPS.psm1 @@ -14,5 +14,43 @@ Get-ChildItem $scriptRoot *.ps1 | ForEach-Object { Import-Module $_.FullName } + +$SnipeItAliases= @{'Get-Asset' = 'Get-SnipeItAsset'; + 'Get-AssetMaintenance' = 'Get-SnipeItAssetMaintenance'; + 'Get-Category' = 'Get-SnipeItCategory'; + 'Get-Company' = 'Get-SnipeItCompany'; + 'Get-Component' = 'Get-SnipeItCompany'; + 'Get-CustomField' = 'Get-SnipeItCustomField'; + 'Get-Department' = 'Get-SnipeItDepartment'; + 'Get-Fieldset' = 'Get-SnipeItFieldset'; + 'Get-Manufacturer' = 'Get-SnipeItManufacturer'; + 'Get-Model' = 'Get-SnipeItModel'; + 'Get-Status' = 'Get-SnipeItStatus'; + 'Get-Supplier' = 'Get-SnipeItSupplier'; + 'Get-User' = 'Get-SnipeItUser'; + 'New-Asset' = 'New-SnipeItAsset'; + 'New-AssetMaintenance' = 'New-SnipeItAssetMaintenance'; + 'New-Category' = 'New-SnipeItCategory'; + 'New-Component' = 'New-SnipeItComponent'; + 'New-CustomField' = 'New-SnipeItCustomField'; + 'New-Department' = 'New-SnipeItDepartment'; + 'New-License' = 'New-SnipeItLicense'; + 'Set-License' = 'Set-SnipeItLicense'; + 'New-Location' = 'New-SnipeItLocation'; + 'New-Manufacturer' = 'New-SnipeItManufacturer'; + 'New-Model' = 'New-SnipeItModel'; + 'New-User' = 'New-SnipeItUser'; + 'Set-Asset' = 'Set-SnipeItAsset'; + 'Set-AssetOwner' = 'Set-SnipeItAssetOwner'; + 'Set-Component' = 'Set-SnipeItComponent'; + 'Set-Model' = 'Set-SnipeItModel'; + 'Set-Info' = 'Set-SnipeItInfo'; + 'Set-User' = 'Set-SnipeItUser'; + 'New-Accessory' = 'New-SnipeItAccessory'; + 'Set-Accessory' = 'Set-SnipeItAccessory'; + 'Get-Accessory' = 'Get-SnipeItAccessory'; + 'Remove-Asset' = 'Remove-SnipeItAsset'; + 'Remove-User' = 'Remove-SnipeItUser';} + #Create unprefixed aliases Set-SnipeItAlias From 69ac809fb0fd64d06aa5eeb71e72373b85694159 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Mon, 24 May 2021 11:06:17 +0300 Subject: [PATCH 15/17] Helper function to update existing SnipeItPS scripts --- SnipeitPS/Public/Update-SnipeItAlias.ps1 | 20 +++++- docs/SnipeItPS.md | 3 + docs/Update-SnipeItAlias.md | 91 ++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 docs/Update-SnipeItAlias.md diff --git a/SnipeitPS/Public/Update-SnipeItAlias.ps1 b/SnipeitPS/Public/Update-SnipeItAlias.ps1 index dcc23bf..865f7da 100644 --- a/SnipeitPS/Public/Update-SnipeItAlias.ps1 +++ b/SnipeitPS/Public/Update-SnipeItAlias.ps1 @@ -1,3 +1,21 @@ +<# +.SYNOPSIS +Replaces old SnipeItPS commands with new ones + +.DESCRIPTION +Replaces old SnipeItPS commands with new ones + +.PARAMETER String +Input string + +.EXAMPLE +Get-Content [your-script.ps1] | Update-SnipeItAlias | Out-File [new-script-name.ps1] +Replaces old command from file "your-script.ps1" and creates new script "new-script-name.ps1" +After testing new file you can replace old file with new. + +#> + + function Update-SnipeItAlias() { [CmdletBinding( @@ -28,7 +46,7 @@ function Update-SnipeItAlias() } } end{ - Write-Verbose "..replacing done 1 " + Write-Verbose "..replacing done" } diff --git a/docs/SnipeItPS.md b/docs/SnipeItPS.md index 2189f2f..4b03e7d 100644 --- a/docs/SnipeItPS.md +++ b/docs/SnipeItPS.md @@ -122,3 +122,6 @@ Updates Model on Snipe-it asset system ### [Set-SnipeItUser](Set-SnipeItUser.md) Creates a new user +### [Update-SnipeItAlias](Update-SnipeItAlias.md) +{{ Fill in the Synopsis }} + diff --git a/docs/Update-SnipeItAlias.md b/docs/Update-SnipeItAlias.md new file mode 100644 index 0000000..607bdd4 --- /dev/null +++ b/docs/Update-SnipeItAlias.md @@ -0,0 +1,91 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Update-SnipeItAlias + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +Update-SnipeItAlias [-String] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -String +{{ Fill String Description }} + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String[] + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS From 17b8a726d11a7e1920ffd073a1616501162ed726 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Mon, 24 May 2021 11:29:43 +0300 Subject: [PATCH 16/17] Version to 1.2 --- CHANGELOG.md | 19 +++++++++++++++++++ SnipeitPS/SnipeItPS.psd1 | 2 +- appveyor.yml | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f8d2ff..9d2b243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/), and this project adheres to [Semantic Versioning](http://semver.org/). +# [v1.2.x] - 2021-05-24 + +## Prefixing SnipeItPS + +### New Features +All commands are now prefixed like Set-Info -> Set-SnipeItInfo. +To keep compatibility all old commands are available as aliases. +To update existing scripts theres Update-SnipeItAlias command. + +### New fuctions +- Update-SnipeitAlias Tool to update existing scripts +- Get-SnipeItLicenceSeat lists license seats +- Set-SnipeItLicenseSeat Set and checkouts/in license seats +Licenseseat api is supported from Snipe-It release => v5.1.5 + +### New fixes +Added -id parameter support to support Get-SnipeItCustomField and +Get-SnipeItFieldSet commands + # [v1.1.x] - 2021-05-18 ## Pull request rollup release. Lots of new features including: diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 0a7186b..0f7a1e0 100644 --- a/SnipeitPS/SnipeItPS.psd1 +++ b/SnipeitPS/SnipeItPS.psd1 @@ -12,7 +12,7 @@ RootModule = 'SnipeItPS' # Version number of this module. -ModuleVersion = '1.1' +ModuleVersion = '1.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/appveyor.yml b/appveyor.yml index b5df4ce..f0d02fd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,7 +14,7 @@ environment: PSGalleryAPIKey: secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm -version: 1.1.{build} +version: 1.2.{build} # Don't rebuild when I tag a release on GitHub skip_tags: true From 3938f360d34761f2684df5fc0104e72e9c111933 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Mon, 24 May 2021 12:52:29 +0300 Subject: [PATCH 17/17] AllowEmptyString --- SnipeitPS/Public/Update-SnipeItAlias.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/SnipeitPS/Public/Update-SnipeItAlias.ps1 b/SnipeitPS/Public/Update-SnipeItAlias.ps1 index 865f7da..7869b34 100644 --- a/SnipeitPS/Public/Update-SnipeItAlias.ps1 +++ b/SnipeitPS/Public/Update-SnipeItAlias.ps1 @@ -25,6 +25,7 @@ function Update-SnipeItAlias() param( [Parameter(Mandatory = $true, ValueFromPipeline = $true)] + [AllowEmptyString()] [string[]] $String )