mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
commit
5934568b20
97 changed files with 1912 additions and 627 deletions
19
CHANGELOG.md
19
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:
|
||||
|
|
|
|||
38
SnipeitPS/Private/Get-SnipeItAlias.ps1
Normal file
38
SnipeitPS/Private/Get-SnipeItAlias.ps1
Normal file
|
|
@ -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';}
|
||||
}
|
||||
18
SnipeitPS/Private/Set-SnipeItAlias.ps1
Normal file
18
SnipeitPS/Private/Set-SnipeItAlias.ps1
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
function Set-SnipeItAlias()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
)]
|
||||
param()
|
||||
Write-Verbose "Setting compatibility aliases.. "
|
||||
Write-Verbose "All aliases are deprediated."
|
||||
$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
|
||||
|
||||
}
|
||||
15
SnipeitPS/Private/Test-SnipeItAlias.ps1
Normal file
15
SnipeitPS/Private/Test-SnipeItAlias.ps1
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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."
|
||||
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]"'
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
Returns a list of all Snipe-IT custom fields
|
||||
|
||||
.PARAMETER url
|
||||
URL of Snipeit system, can be set using Set-Info command
|
||||
|
||||
.PARAMETER apiKey
|
||||
Users API Key for Snipeit, can be set using Set-Info command
|
||||
|
||||
.EXAMPLE
|
||||
Get-Field -url "https://assets.example.com" -token "token..."
|
||||
|
||||
#>
|
||||
|
||||
function Get-CustomField()
|
||||
{
|
||||
Param(
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$url,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
|
||||
$Parameters = @{
|
||||
Uri = "$url/api/v1/fields"
|
||||
Method = 'Get'
|
||||
Token = $apiKey
|
||||
}
|
||||
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
||||
$result
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
Gets a list of Snipe-it Fieldsets
|
||||
|
||||
.PARAMETER url
|
||||
URL of Snipeit system, can be set using Set-Info command
|
||||
|
||||
.PARAMETER apiKey
|
||||
Users API Key for Snipeit, can be set using Set-Info command
|
||||
|
||||
.EXAMPLE
|
||||
Get-Fieldset -url "https://assets.example.com" -token "token..."
|
||||
|
||||
.EXAMPLE
|
||||
Get-Fieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" }
|
||||
|
||||
#>
|
||||
|
||||
function Get-Fieldset() {
|
||||
Param(
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$url,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
|
||||
$Parameters = @{
|
||||
Uri = "$url/api/v1/fieldsets"
|
||||
Method = 'Get'
|
||||
Token = $apiKey
|
||||
}
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
||||
$result
|
||||
}
|
||||
|
|
@ -21,20 +21,20 @@ 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
|
||||
Get-SnipeItAccessory -search Keyboard
|
||||
|
||||
.EXAMPLE
|
||||
Get-Accessory -id 1
|
||||
Get-SnipeItAccessory -id 1
|
||||
|
||||
#>
|
||||
|
||||
function Get-Accessory() {
|
||||
function Get-SnipeItAccessory() {
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
|
|
@ -63,6 +63,7 @@ function Get-Accessory() {
|
|||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
|
|
@ -81,7 +82,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
|
||||
|
|
@ -54,29 +54,29 @@ 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..."
|
||||
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-Asset() {
|
||||
function Get-SnipeItAsset() {
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[string]$asset_tag,
|
||||
|
||||
|
|
@ -118,6 +118,7 @@ function Get-Asset() {
|
|||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
|
|
@ -164,7 +165,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
|
||||
|
|
@ -24,21 +24,21 @@ 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..."
|
||||
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-AssetMaintenance() {
|
||||
function Get-SnipeItAssetMaintenance() {
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
|
|
@ -62,6 +62,8 @@ function Get-AssetMaintenance() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$Parameters = @{
|
||||
|
|
@ -79,7 +81,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
|
||||
|
|
@ -18,25 +18,25 @@ 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
|
||||
Get-SnipeItCategory -id 1
|
||||
|
||||
.EXAMPLE
|
||||
Get-Category -search "Laptop"
|
||||
Get-SnipeItCategory -search "Laptop"
|
||||
|
||||
#>
|
||||
|
||||
function Get-Category()
|
||||
function Get-SnipeItCategory()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -53,6 +53,7 @@ function Get-Category()
|
|||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
|
|
@ -81,7 +82,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
|
||||
|
|
@ -17,27 +17,27 @@ 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
|
||||
Get-SnipeItCompany
|
||||
Gets all companies
|
||||
|
||||
.EXAMPLE
|
||||
Get-Company -id 1
|
||||
Get-SnipeItCompany -id 1
|
||||
Gets specific company
|
||||
|
||||
#>
|
||||
|
||||
function Get-Company()
|
||||
function Get-SnipeItCompany()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -55,6 +55,8 @@ function Get-Company()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/companies"
|
||||
|
|
@ -82,7 +84,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
|
||||
|
|
@ -18,30 +18,30 @@ 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
|
||||
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
|
||||
|
||||
#>
|
||||
|
||||
function Get-Component() {
|
||||
function Get-SnipeItComponent() {
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[int]$category_id,
|
||||
|
||||
|
|
@ -68,6 +68,8 @@ function Get-Component() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/components"
|
||||
|
|
@ -95,7 +97,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
|
||||
49
SnipeitPS/Public/Get-SnipeItCustomField.ps1
Normal file
49
SnipeitPS/Public/Get-SnipeItCustomField.ps1
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
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-SnipeItInfo command
|
||||
|
||||
.PARAMETER apiKey
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
.EXAMPLE
|
||||
Get-SnipeItCustomField -url "https://assets.example.com" -token "token..."
|
||||
|
||||
#>
|
||||
|
||||
function Get-SnipeItCustomField()
|
||||
{
|
||||
Param(
|
||||
[int]$id,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$url,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
if ($id) {
|
||||
$apiurl= "$url/api/v1/fields/$id"
|
||||
} else {
|
||||
$apiurl = "$url/api/v1/fields"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
Uri = $apiurl
|
||||
Method = 'Get'
|
||||
Token = $apiKey
|
||||
}
|
||||
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
||||
$result
|
||||
}
|
||||
|
|
@ -18,28 +18,28 @@ 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..."
|
||||
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
|
||||
|
||||
#>
|
||||
|
||||
function Get-Department()
|
||||
function Get-SnipeItDepartment()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -60,6 +60,8 @@ function Get-Department()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/departments"
|
||||
|
|
@ -87,7 +89,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
|
||||
50
SnipeitPS/Public/Get-SnipeItFieldset.ps1
Normal file
50
SnipeitPS/Public/Get-SnipeItFieldset.ps1
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
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-SnipeItInfo command
|
||||
|
||||
.PARAMETER apiKey
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
.EXAMPLE
|
||||
Get-SnipeItFieldset -url "https://assets.example.com" -token "token..."
|
||||
|
||||
.EXAMPLE
|
||||
Get-SnipeItFieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" }
|
||||
|
||||
#>
|
||||
|
||||
function Get-SnipeItFieldset() {
|
||||
Param(
|
||||
[int]$id,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$url,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
if ($id) {
|
||||
$apiurl = "$url/api/v1/fieldsets/$id"
|
||||
} else {
|
||||
$apiurl = "$url/api/v1/fieldsets"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
Uri = $apiurl
|
||||
Method = 'Get'
|
||||
Token = $apiKey
|
||||
}
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
||||
$result
|
||||
}
|
||||
|
|
@ -19,24 +19,24 @@ 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
|
||||
Get-SnipeItLicense -search SomeLicense
|
||||
|
||||
.EXAMPLE
|
||||
Get-License -id 1
|
||||
Get-SnipeItLicense -id 1
|
||||
|
||||
#>
|
||||
|
||||
function Get-License() {
|
||||
function Get-SnipeItLicense() {
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[string]$name,
|
||||
|
||||
|
|
@ -79,6 +79,8 @@ function Get-License() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/licenses"
|
||||
|
|
@ -106,7 +108,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
|
||||
95
SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1
Normal file
95
SnipeitPS/Public/Get-SnipeItLicenseSeat.ps1
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<#
|
||||
.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-SnipeItLicenseSeat -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -18,16 +18,16 @@ 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
|
||||
Get-SnipeItLocation -search Location1
|
||||
|
||||
.EXAMPLE
|
||||
Get-Location -id 3
|
||||
Get-SnipeItLocation -id 3
|
||||
|
||||
#>
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ function Get-SnipeitLocation()
|
|||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -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"
|
||||
|
|
@ -18,27 +18,27 @@ 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
|
||||
Get-SnipeItManufacturer -search HP
|
||||
Search all manufacturers for string HP
|
||||
|
||||
.EXAMPLE
|
||||
Get-Manufacturer -id 3
|
||||
Get-SnipeItManufacturer -id 3
|
||||
Returns manufacturer with id 3
|
||||
|
||||
#>
|
||||
|
||||
function Get-Manufacturer()
|
||||
function Get-SnipeItManufacturer()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -56,6 +56,8 @@ function Get-Manufacturer()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/manufacturers"
|
||||
|
|
@ -83,7 +85,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
|
||||
|
|
@ -18,20 +18,20 @@ 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"
|
||||
Get-SnipeItModel -search "DL380"
|
||||
|
||||
.EXAMPLE
|
||||
Get-Model -id 1
|
||||
Get-SnipeItModel -id 1
|
||||
|
||||
#>
|
||||
|
||||
function Get-Model()
|
||||
function Get-SnipeItModel()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
|
@ -54,6 +54,8 @@ function Get-Model()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/models"
|
||||
|
|
@ -81,7 +83,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
|
||||
|
|
@ -18,25 +18,25 @@ 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"
|
||||
Get-SnipeItStatus -search "Ready to Deploy"
|
||||
|
||||
.EXAMPLE
|
||||
Get-Status -id 3
|
||||
Get-SnipeItStatus -id 3
|
||||
|
||||
#>
|
||||
|
||||
function Get-Status()
|
||||
function Get-SnipeItStatus()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -54,6 +54,8 @@ function Get-Status()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/statuslabels"
|
||||
|
|
@ -81,7 +83,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
|
||||
|
|
@ -18,25 +18,25 @@ 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
|
||||
Get-SnipeItSupplier -search MySupplier
|
||||
|
||||
.EXAMPLE
|
||||
Get-Supplier -id 2
|
||||
Get-SnipeItSupplier -id 2
|
||||
|
||||
#>
|
||||
|
||||
function Get-Supplier()
|
||||
function Get-SnipeItSupplier()
|
||||
{
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -54,6 +54,8 @@ function Get-Supplier()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/suppliers"
|
||||
|
|
@ -81,7 +83,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
|
||||
|
|
@ -24,25 +24,25 @@ 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
|
||||
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-User() {
|
||||
function Get-SnipeItUser() {
|
||||
Param(
|
||||
[string]$search,
|
||||
|
||||
|
|
@ -76,6 +76,8 @@ function Get-User() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$apiurl = "$url/api/v1/users"
|
||||
|
|
@ -102,7 +104,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
|
||||
|
|
@ -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
|
||||
New-SnipeItAccessory -name "Accessory" -qty 3 -category_id 1
|
||||
|
||||
#>
|
||||
function New-Accessory() {
|
||||
function New-SnipeItAccessory() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -102,6 +102,8 @@ function New-Accessory() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['purchase_date']) {
|
||||
|
|
@ -43,29 +43,29 @@ 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.
|
||||
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.
|
||||
#>
|
||||
|
||||
function New-Asset()
|
||||
function New-SnipeItAsset()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -123,6 +123,8 @@ function New-Asset()
|
|||
[hashtable] $customfields
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
New-SnipeItAssetMaintenence -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"
|
||||
|
|
@ -77,6 +77,8 @@ function New-AssetMaintenance() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['start_date']) {
|
||||
|
|
@ -12,11 +12,11 @@ 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
|
||||
|
||||
#>
|
||||
|
||||
function New-Audit()
|
||||
function New-SnipeItAudit()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -37,6 +37,8 @@ function New-Audit()
|
|||
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"location_id" = $location_id
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -24,10 +24,10 @@ 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-Category()
|
||||
function New-SnipeItCategory()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -55,6 +55,8 @@ function New-Category()
|
|||
[switch]$checkin_email
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"name" = $name
|
||||
"category_type" = $category_type
|
||||
|
|
@ -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"
|
||||
New-SnipeItCompany -name "Acme Company"
|
||||
|
||||
#>
|
||||
|
||||
function New-Company()
|
||||
function New-SnipeItCompany()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -37,6 +37,8 @@ function New-Company()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$Body = $Values | ConvertTo-Json;
|
||||
|
|
@ -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"
|
||||
|
|
@ -67,6 +67,8 @@ function New-Component() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['purchase_date']) {
|
||||
|
|
@ -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"
|
||||
New-SnipeItCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset"
|
||||
#>
|
||||
|
||||
function New-CustomField()
|
||||
function New-SnipeItCustomField()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -46,6 +46,8 @@ function New-CustomField()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
#Convert Values to JSON format
|
||||
|
|
@ -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
|
||||
New-SnipeItDepartment -name "Department1" -company_id 1 -localtion_id 1 -manager_id 3
|
||||
|
||||
#>
|
||||
|
||||
function New-Department() {
|
||||
function New-SnipeItDepartment() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -53,6 +53,8 @@ function New-Department() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$Body = $Values | ConvertTo-Json;
|
||||
|
|
@ -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
|
||||
New-SnipeItLicence -name "License" -seats 3 -company_id 1
|
||||
|
||||
#>
|
||||
|
||||
function New-License() {
|
||||
function New-SnipeItLicense() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -124,6 +124,8 @@ function New-License() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['expiration_date']) {
|
||||
|
|
@ -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
|
||||
New-SnipeItLocation -name "Room 1" -address "123 Asset Street" -parent_id 14
|
||||
#>
|
||||
|
||||
function New-Location() {
|
||||
function New-SnipeItLocation() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -78,6 +78,8 @@ function New-Location() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$Body = $Values | ConvertTo-Json;
|
||||
|
|
@ -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"
|
||||
New-SnipeItManufacturer -name "HP"
|
||||
#>
|
||||
|
||||
function New-Manufacturer()
|
||||
function New-SnipeItManufacturer()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -36,6 +36,7 @@ function New-Manufacturer()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"name" = $Name
|
||||
|
|
@ -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
|
||||
New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
|
||||
#>
|
||||
|
||||
function New-Model()
|
||||
function New-SnipeItModel()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -61,6 +61,8 @@ function New-Model()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
name = $name
|
||||
category_id = $category_id
|
||||
|
|
@ -48,19 +48,19 @@
|
|||
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
|
||||
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
|
||||
General notes
|
||||
#>
|
||||
function New-User() {
|
||||
function New-SnipeItUser() {
|
||||
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -109,6 +109,8 @@ function New-User() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($password ) {
|
||||
|
|
@ -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
|
||||
Remove-SnipeItAsset -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)]
|
||||
|
|
@ -32,6 +32,8 @@ function Remove-Asset ()
|
|||
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"ID" = $Name
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
function Remove-AssetMaintenance {
|
||||
function Remove-SnipeItAssetMaintenance {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Remove asset maintenance from Snipe-it asset system
|
||||
|
|
@ -7,13 +7,13 @@ 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
|
||||
Remove-SnipeItAssetMaintenance -ID 44 -url $url -apiKey $secret -Verbose
|
||||
#>
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -22,7 +22,7 @@ function Remove-AssetMaintenance {
|
|||
param (
|
||||
# Asset maintenance ID
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]
|
||||
[int]
|
||||
$ID,
|
||||
|
||||
# SnipeIt URL
|
||||
|
|
@ -36,6 +36,8 @@ function Remove-AssetMaintenance {
|
|||
$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"ID" = $ID
|
||||
}
|
||||
|
|
@ -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
|
||||
Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose
|
||||
#>
|
||||
|
||||
function Remove-User ()
|
||||
function Remove-SnipeItUser ()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -33,6 +33,8 @@ function Remove-User ()
|
|||
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"ID" = $ID
|
||||
}
|
||||
|
|
@ -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
|
||||
Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose
|
||||
#>
|
||||
function Reset-AssetOwner() {
|
||||
function Reset-SnipeItAssetOwner() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Medium"
|
||||
|
|
@ -48,6 +48,8 @@ function Reset-AssetOwner() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = @{
|
||||
"notes" = $notes
|
||||
}
|
||||
|
|
@ -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
|
||||
Set-SnipeItAccessory -id 1 -qty 3
|
||||
|
||||
#>
|
||||
function Set-Accessory() {
|
||||
function Set-SnipeItAccessory() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -99,6 +99,8 @@ function Set-Accessory() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['purchase_date']) {
|
||||
|
|
@ -51,22 +51,22 @@
|
|||
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
|
||||
|
||||
.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-Asset()
|
||||
function Set-SnipeItAsset()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -114,6 +114,8 @@ function Set-Asset()
|
|||
[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)}
|
||||
|
|
@ -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
|
||||
Set-SnipeItAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing check out to user"
|
||||
#>
|
||||
function Set-AssetOwner()
|
||||
function Set-SnipeItAssetOwner()
|
||||
{
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -65,6 +65,8 @@ function Set-AssetOwner()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($Values['expected_checkin']) {
|
||||
|
|
@ -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,
|
||||
|
|
@ -69,6 +69,8 @@ function Set-Component()
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['purchase_date']) {
|
||||
|
|
@ -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 (
|
||||
|
|
@ -23,7 +23,7 @@ function Set-Info {
|
|||
)
|
||||
|
||||
BEGIN {
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
function Add-DefaultParameter {
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
|
|
@ -43,10 +43,11 @@ function Set-Info {
|
|||
# http://stackoverflow.com/questions/30427110/set-psdefaultparametersvalues-for-use-within-module-scope
|
||||
$PSDefaultParameterValues["${command}:${parameter}"] = $Value
|
||||
$global:PSDefaultParameterValues["${command}:${parameter}"] = $Value
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$moduleCommands = Get-Command -Module SnipeitPS
|
||||
$moduleCommands = Get-Command -Module SnipeitPS -CommandType Function
|
||||
}
|
||||
|
||||
PROCESS {
|
||||
|
|
@ -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
|
||||
Set-SnipeItLicence -name "License" -seats 3 -company_id 1
|
||||
|
||||
#>
|
||||
|
||||
function Set-License() {
|
||||
function Set-SnipeItLicense() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -129,6 +129,8 @@ function Set-License() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
if ($values['expiration_date']) {
|
||||
78
SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1
Normal file
78
SnipeitPS/Public/Set-SnipeItLicenseSeat.ps1
Normal file
|
|
@ -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-SnipeItLicenseSeat()
|
||||
{
|
||||
[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
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
|
||||
#>
|
||||
|
||||
function Set-Model() {
|
||||
function Set-SnipeItModel() {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Medium"
|
||||
|
|
@ -66,6 +66,8 @@ function Set-Model() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$Body = $Values | ConvertTo-Json;
|
||||
|
|
@ -48,19 +48,19 @@
|
|||
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
|
||||
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
|
||||
General notes
|
||||
#>
|
||||
function Set-User() {
|
||||
function Set-SnipeItUser() {
|
||||
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
|
|
@ -104,6 +104,8 @@ function Set-User() {
|
|||
[string]$apiKey
|
||||
)
|
||||
|
||||
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||
|
||||
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters
|
||||
|
||||
$Body = $Values | ConvertTo-Json;
|
||||
55
SnipeitPS/Public/Update-SnipeItAlias.ps1
Normal file
55
SnipeitPS/Public/Update-SnipeItAlias.ps1
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<#
|
||||
.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(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
)]
|
||||
param(
|
||||
[Parameter(Mandatory = $true,
|
||||
ValueFromPipeline = $true)]
|
||||
[AllowEmptyString()]
|
||||
[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"
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,3 +1,7 @@
|
|||
<#
|
||||
.DESCRIPTION
|
||||
Powershell API for SnipeIt Asset Management
|
||||
#>
|
||||
$scriptRoot = $PSScriptRoot + '\Public'
|
||||
|
||||
Get-ChildItem $scriptRoot *.ps1 | ForEach-Object {
|
||||
|
|
@ -9,3 +13,44 @@ $scriptRoot = $PSScriptRoot + '\Private'
|
|||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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] <String>] [[-company_id] <Int32>] [[-category_id] <Int32>]
|
||||
Get-SnipeItAccessory [[-search] <String>] [[-company_id] <Int32>] [[-category_id] <Int32>]
|
||||
[[-manufacturer_id] <Int32>] [[-supplier_id] <Int32>] [[-sort] <String>] [[-order] <String>]
|
||||
[[-limit] <Int32>] [[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -25,12 +25,12 @@ 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
|
||||
|
|
@ -51,7 +51,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
|
||||
|
|
@ -203,7 +203,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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-asset_tag] <String>] [[-asset_serial] <String>]
|
||||
Get-SnipeItAsset [[-search] <String>] [[-id] <Int32>] [[-asset_tag] <String>] [[-asset_serial] <String>]
|
||||
[[-order_number] <Int32>] [[-model_id] <Int32>] [[-category_id] <Int32>] [[-manufacturer_id] <Int32>]
|
||||
[[-company_id] <Int32>] [[-location_id] <Int32>] [[-depreciation_id] <Int32>] [[-requestable] <Boolean>]
|
||||
[[-status] <String>] [[-status_id] <Int32>] [[-sort] <String>] [[-order] <String>] [[-limit] <Int32>]
|
||||
|
|
@ -27,22 +27,22 @@ Get-Asset [[-search] <String>] [[-id] <String>] [[-asset_tag] <String>] [[-asset
|
|||
|
||||
### 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
|
||||
|
|
@ -63,7 +63,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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -350,7 +350,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
|
||||
|
|
@ -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] <String>] [[-asset_id] <Int32>] [[-sort] <String>] [[-order] <String>]
|
||||
Get-SnipeItAssetMaintenance [[-search] <String>] [[-asset_id] <Int32>] [[-sort] <String>] [[-order] <String>]
|
||||
[[-limit] <Int32>] [-all] [[-offset] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
|
|
@ -24,17 +24,17 @@ Get-AssetMaintenance [[-search] <String>] [[-asset_id] <Int32>] [[-sort] <String
|
|||
|
||||
### 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
|
||||
|
|
@ -55,7 +55,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
|
||||
|
|
@ -162,7 +162,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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
|
||||
[-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItCategory [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,12 +24,12 @@ Get-Category [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-limit]
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Category -id 1
|
||||
Get-SnipeItCategory -id 1
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Category -search "Laptop"
|
||||
Get-SnipeItCategory -search "Laptop"
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
|
||||
[-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItCompany [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,14 +24,14 @@ Get-Company [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-limit]
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Company
|
||||
Get-SnipeItCompany
|
||||
```
|
||||
|
||||
Gets all companies
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Company -id 1
|
||||
Get-SnipeItCompany -id 1
|
||||
```
|
||||
|
||||
Gets specific company
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-category_id] <Int32>] [[-company_id] <Int32>]
|
||||
Get-SnipeItComponent [[-search] <String>] [[-id] <Int32>] [[-category_id] <Int32>] [[-company_id] <Int32>]
|
||||
[[-location_id] <Int32>] [[-order] <String>] [[-sort] <String>] [[-limit] <Int32>] [[-offset] <Int32>] [-all]
|
||||
[-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -25,21 +25,21 @@ Get-Component [[-search] <String>] [[-id] <String>] [[-category_id] <Int32>] [[-
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Component
|
||||
Get-SnipeItComponent
|
||||
```
|
||||
|
||||
Returns all components
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Component -search display
|
||||
Get-SnipeItComponent -search display
|
||||
```
|
||||
|
||||
Returns search results containeing string display
|
||||
|
||||
### EXAMPLE 3
|
||||
```
|
||||
Get-Component -id
|
||||
Get-SnipeItComponent -id
|
||||
```
|
||||
|
||||
Returns specific component
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -214,7 +214,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
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
---
|
||||
external help file: SnipeItPS-help.xml
|
||||
Module Name: SnipeitPS
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-Fieldset
|
||||
# Get-SnipeItCustomField
|
||||
|
||||
## SYNOPSIS
|
||||
Gets a list of Snipe-it Fieldsets
|
||||
Returns specific Snipe-IT custom field or a list of all custom field
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-Fieldset [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItCustomField [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -23,18 +23,43 @@ Get-Fieldset [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Fieldset -url "https://assets.example.com" -token "token..."
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Fieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" }
|
||||
Get-SnipeItCustomField -url "https://assets.example.com" -token "token..."
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -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
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
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-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -48,21 +73,6 @@ 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: 1
|
||||
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).
|
||||
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
|
||||
[-all] [[-sort] <String>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItDepartment [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [[-sort] <String>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,17 +24,17 @@ Get-Department [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-limi
|
|||
|
||||
### 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
|
||||
|
|
@ -55,7 +55,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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -162,7 +162,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
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
---
|
||||
external help file: SnipeItPS-help.xml
|
||||
Module Name: SnipeitPS
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-CustomField
|
||||
# Get-SnipeItFieldset
|
||||
|
||||
## SYNOPSIS
|
||||
Returns a list of all Snipe-IT custom fields
|
||||
Returns a fieldset or list of Snipe-it Fieldsets
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-CustomField [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItFieldset [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -23,13 +23,48 @@ Get-CustomField [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Field -url "https://assets.example.com" -token "token..."
|
||||
Get-SnipeItFieldset -url "https://assets.example.com" -token "token..."
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-SnipeItFieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" }
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -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
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
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-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -43,21 +78,6 @@ 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: 1
|
||||
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).
|
||||
|
||||
351
docs/Get-SnipeItLicense.md
Normal file
351
docs/Get-SnipeItLicense.md
Normal file
|
|
@ -0,0 +1,351 @@
|
|||
---
|
||||
external help file: SnipeItPS-help.xml
|
||||
Module Name: SnipeitPS
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-SnipeItLicense
|
||||
|
||||
## SYNOPSIS
|
||||
Gets a list of Snipe-it Licenses
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-SnipeItLicense [[-search] <String>] [[-id] <Int32>] [[-name] <String>] [[-company_id] <Int32>]
|
||||
[[-product_key] <String>] [[-order_number] <Int32>] [[-purchase_order] <String>] [[-license_name] <String>]
|
||||
[[-license_email] <MailAddress>] [[-manufacturer_id] <Int32>] [[-supplier_id] <Int32>]
|
||||
[[-depreciation_id] <Int32>] [[-category_id] <Int32>] [[-order] <String>] [[-sort] <String>]
|
||||
[[-limit] <Int32>] [[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-SnipeItLicense -search SomeLicense
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-SnipeItLicense -id 1
|
||||
```
|
||||
|
||||
## 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: 19
|
||||
Default value: None
|
||||
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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
148
docs/Get-SnipeItLicenseSeat.md
Normal file
148
docs/Get-SnipeItLicenseSeat.md
Normal file
|
|
@ -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] <Int32> [[-seat_id] <Int32>] [[-limit] <Int32>] [[-offset] <Int32>] [-all]
|
||||
[-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-SnipeItLicenseSeat -id 1
|
||||
```
|
||||
|
||||
## 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: 6
|
||||
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: True
|
||||
Position: 1
|
||||
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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>]
|
||||
Get-SnipeItManufacturer [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
|
|
@ -24,14 +24,14 @@ Get-Manufacturer [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-li
|
|||
|
||||
### 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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
|
||||
[-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItModel [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,12 +24,12 @@ Get-Model [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <In
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Model -search "DL380"
|
||||
Get-SnipeItModel -search "DL380"
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Model -id 1
|
||||
Get-SnipeItModel -id 1
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
|
@ -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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
|
||||
[-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItStatus [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,12 +24,12 @@ Get-Status [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <
|
|||
|
||||
### 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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
|
||||
[-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
Get-SnipeItSupplier [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,12 +24,12 @@ Get-Supplier [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-limit]
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Supplier -search MySupplier
|
||||
Get-SnipeItSupplier -search MySupplier
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Supplier -id 2
|
||||
Get-SnipeItSupplier -id 2
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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
|
||||
|
|
@ -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] <String>] [[-id] <String>] [[-company_id] <Int32>] [[-location_id] <Int32>]
|
||||
Get-SnipeItUser [[-search] <String>] [[-id] <String>] [[-company_id] <Int32>] [[-location_id] <Int32>]
|
||||
[[-group_id] <Int32>] [[-department_id] <Int32>] [[-username] <String>] [[-email] <String>]
|
||||
[[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String>
|
||||
[<CommonParameters>]
|
||||
|
|
@ -26,22 +26,22 @@ Get-User [[-search] <String>] [[-id] <String>] [[-company_id] <Int32>] [[-locati
|
|||
|
||||
### 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
|
||||
|
|
@ -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
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
---
|
||||
external help file: SnipeItPS-help.xml
|
||||
Module Name: SnipeitPS
|
||||
online version:
|
||||
|
|
@ -13,7 +13,7 @@ Gets a list of Snipe-it Locations
|
|||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-SnipeitLocation [[-search] <String>] [[-id] <String>] [[-order] <String>] [[-limit] <Int32>]
|
||||
Get-SnipeitLocation [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>]
|
||||
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
|
|
@ -24,12 +24,12 @@ Get-SnipeitLocation [[-search] <String>] [[-id] <String>] [[-order] <String>] [[
|
|||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-Location -search Location1
|
||||
Get-SnipeItLocation -search Location1
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-Location -id 3
|
||||
Get-SnipeItLocation -id 3
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
|
@ -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
|
||||
|
|
@ -68,13 +68,13 @@ Accept wildcard characters: False
|
|||
A id of specific Location
|
||||
|
||||
```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
|
||||
```
|
||||
|
|
@ -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-SnipeItInfoeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
|
|||
|
|
@ -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] <Int32> [-model_id] <Int32> [[-name] <String>] [[-asset_tag] <String>]
|
||||
New-SnipeItAsset [-status_id] <Int32> [-model_id] <Int32> [[-name] <String>] [[-asset_tag] <String>]
|
||||
[[-serial] <String>] [[-company_id] <Int32>] [[-order_number] <String>] [[-notes] <String>]
|
||||
[[-warranty_months] <Int32>] [[-purchase_cost] <String>] [[-purchase_date] <String>] [[-supplier_id] <Int32>]
|
||||
[[-rtd_location_id] <Int32>] [-url] <String> [-apiKey] <String> [[-customfields] <Hashtable>] [-WhatIf]
|
||||
|
|
@ -27,21 +27,21 @@ 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.
|
||||
|
|
@ -49,7 +49,7 @@ Using customfields when creating asset.
|
|||
## PARAMETERS
|
||||
|
||||
### -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
|
||||
|
|
@ -260,7 +260,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
|
||||
|
|
@ -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] <Int32> [-supplier_id] <Int32> [-asset_maintenance_type] <String>
|
||||
New-SnipeItAssetMaintenance [-asset_id] <Int32> [-supplier_id] <Int32> [-asset_maintenance_type] <String>
|
||||
[-title] <String> [-start_date] <DateTime> [[-completion_date] <DateTime>] [[-is_warranty] <Boolean>]
|
||||
[[-cost] <Decimal>] [[-notes] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
|
|
@ -26,13 +26,13 @@ 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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -182,7 +182,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
|
||||
|
|
@ -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] <String> [-category_type] <String> [-url] <String> [-apiKey] <String> [-use_default_eula]
|
||||
[-require_acceptance] [-checkin_email] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
New-SnipeItCategory [-name] <String> [-category_type] <String> [-url] <String> [-apiKey] <String>
|
||||
[-use_default_eula] [-require_acceptance] [-checkin_email] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -24,13 +24,13 @@ New-Category [-name] <String> [-category_type] <String> [-url] <String> [-apiKey
|
|||
|
||||
### 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
|
||||
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -105,7 +105,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
|
||||
|
|
@ -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] <String> [-category_id] <Int32> [-qty] <String> [[-company_id] <Int32>]
|
||||
New-SnipeItComponent [-name] <String> [-category_id] <Int32> [-qty] <String> [[-company_id] <Int32>]
|
||||
[[-location_id] <Int32>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>] [-url] <String>
|
||||
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -31,7 +31,7 @@ An example
|
|||
## PARAMETERS
|
||||
|
||||
### -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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -151,7 +151,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
|
||||
|
|
@ -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] <String> [[-HelpText] <String>] [[-Element] <String>] [[-Format] <String>]
|
||||
New-SnipeItCustomField [-Name] <String> [[-HelpText] <String>] [[-Element] <String>] [[-Format] <String>]
|
||||
[[-field_encrypted] <Boolean>] [[-CustomFormat] <String>] [-url] <String> [-apiKey] <String> [-WhatIf]
|
||||
[-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -136,7 +136,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
|
||||
|
|
@ -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] <String> [[-company_id] <Int32>] [[-location_id] <Int32>] [[-manager_id] <Int32>]
|
||||
New-SnipeItDepartment [-name] <String> [[-company_id] <Int32>] [[-location_id] <Int32>] [[-manager_id] <Int32>]
|
||||
[[-notes] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
|
|
@ -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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -120,7 +120,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
|
||||
|
|
@ -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] <String> [-seats] <Int32> [[-category_id] <Int32>] [[-company_id] <Int32>]
|
||||
New-SnipeItLicense [-name] <String> [-seats] <Int32> [[-category_id] <Int32>] [[-company_id] <Int32>]
|
||||
[[-expiration_date] <DateTime>] [[-license_email] <MailAddress>] [[-license_name] <String>]
|
||||
[[-maintained] <Boolean>] [[-manufacturer_id] <Int32>] [[-notes] <String>] [[-order_number] <String>]
|
||||
[[-purchase_cost] <Single>] [[-purchase_date] <DateTime>] [[-reassignable] <Boolean>] [[-serial] <String>]
|
||||
|
|
@ -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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -304,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
|
||||
|
|
@ -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] <String> [[-address] <String>] [[-address2] <String>] [[-state] <String>]
|
||||
New-SnipeItLocation [-name] <String> [[-address] <String>] [[-address2] <String>] [[-state] <String>]
|
||||
[[-country] <String>] [[-zip] <String>] [[-parent_id] <Int32>] [[-manager_id] <Int32>] [[-ldap_ou] <String>]
|
||||
[-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -25,7 +25,7 @@ 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
|
||||
|
|
@ -61,7 +61,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
|
||||
|
|
@ -166,7 +166,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
|
||||
|
|
@ -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] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
New-SnipeItManufacturer [-Name] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -23,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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -59,7 +60,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
|
||||
|
|
@ -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] <String> [[-model_number] <String>] [-category_id] <Int32> [-manufacturer_id] <Int32>
|
||||
New-SnipeItModel [-name] <String> [[-model_number] <String>] [-category_id] <Int32> [-manufacturer_id] <Int32>
|
||||
[[-eol] <Int32>] [-fieldset_id] <Int32> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
|
@ -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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -136,7 +136,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
|
||||
|
|
@ -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] <String> [-last_name] <String> [-username] <String> [[-password] <String>]
|
||||
New-SnipeItUser [-first_name] <String> [-last_name] <String> [-username] <String> [[-password] <String>]
|
||||
[[-activated] <Boolean>] [[-notes] <String>] [[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>]
|
||||
[[-company_id] <Int32>] [[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>]
|
||||
[[-employee_num] <String>] [[-ldap_import] <Boolean>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
|
||||
|
|
@ -27,7 +27,7 @@ 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
|
||||
|
|
@ -50,7 +50,7 @@ Accept wildcard characters: False
|
|||
```
|
||||
|
||||
### -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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -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
|
||||
|
|
@ -260,7 +260,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
|
||||
|
|
@ -1,35 +1,35 @@
|
|||
---
|
||||
---
|
||||
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
|
||||
Removes Asset from Snipe-it asset system
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-Asset [-ID] <String> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
Remove-SnipeItAsset [-ID] <Int32> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## 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
|
||||
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -47,19 +47,19 @@ 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
|
||||
```
|
||||
|
||||
### -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
|
||||
|
|
@ -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] <String> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
Remove-SnipeItUser [-ID] <String> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -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
|
||||
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -59,7 +59,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
|
||||
|
|
@ -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] <Int32> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>]
|
||||
Set-SnipeItAccessory [-id] <Int32> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>]
|
||||
[[-company_id] <Int32>] [[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-purchase_cost] <Single>]
|
||||
[[-purchase_date] <DateTime>] [[-min_qty] <Boolean>] [[-supplier_id] <Int32>] [-url] <String>
|
||||
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
|
|
@ -26,13 +26,13 @@ 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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -212,7 +212,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
|
||||
|
|
@ -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] <Int32> [[-Name] <String>] [[-Status_id] <String>] [[-Model_id] <String>]
|
||||
Set-SnipeItAsset [-id] <Int32> [[-Name] <String>] [[-Status_id] <String>] [[-Model_id] <String>]
|
||||
[[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>] [[-serial] <String>]
|
||||
[[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>]
|
||||
[[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>]
|
||||
|
|
@ -27,18 +27,18 @@ 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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -279,7 +279,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
|
||||
|
|
@ -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] <Int32> [-assigned_id] <Int32> [[-checkout_to_type] <String>] [[-name] <String>]
|
||||
Set-SnipeItAssetOwner [-id] <Int32> [-assigned_id] <Int32> [[-checkout_to_type] <String>] [[-name] <String>]
|
||||
[[-note] <String>] [[-expected_checkin] <DateTime>] [[-checkout_at] <DateTime>] [-url] <String>
|
||||
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -25,13 +25,13 @@ 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
|
||||
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -154,7 +154,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
|
||||
|
|
@ -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] <String> [-qty] <String> [[-name] <String>] [[-company_id] <Int32>]
|
||||
Set-SnipeItComponent [-id] <String> [-qty] <String> [[-name] <String>] [[-company_id] <Int32>]
|
||||
[[-location_id] <Int32>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>] [-url] <String>
|
||||
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -31,7 +31,7 @@ An example
|
|||
## PARAMETERS
|
||||
|
||||
### -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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -151,7 +151,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
|
||||
|
|
@ -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] <Uri>] [[-apiKey] <String>] [<CommonParameters>]
|
||||
Set-SnipeItInfo [[-url] <Uri>] [[-apiKey] <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -23,13 +23,13 @@ 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
|
||||
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -44,7 +44,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: Uri
|
||||
|
|
@ -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] <Int32> [[-name] <String>] [[-seats] <Int32>] [[-category_id] <Int32>]
|
||||
Set-SnipeItLicense [-id] <Int32> [[-name] <String>] [[-seats] <Int32>] [[-category_id] <Int32>]
|
||||
[[-company_id] <Int32>] [[-expiration_date] <DateTime>] [[-license_email] <MailAddress>]
|
||||
[[-license_name] <String>] [[-maintained] <Boolean>] [[-manufacturer_id] <Int32>] [[-notes] <String>]
|
||||
[[-order_number] <String>] [[-purchase_cost] <Single>] [[-purchase_date] <DateTime>]
|
||||
|
|
@ -28,13 +28,13 @@ 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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -319,7 +319,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
|
||||
186
docs/Set-SnipeItLicenseSeat.md
Normal file
186
docs/Set-SnipeItLicenseSeat.md
Normal file
|
|
@ -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] <Int32> [-seat_id] <Int32> [[-assigned_id] <Int32>] [[-asset_id] <Int32>]
|
||||
[[-note] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## 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
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### -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
|
||||
|
|
@ -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] <Int32> [[-name] <String>] [[-model_number] <String>] [[-category_id] <Int32>]
|
||||
Set-SnipeItModel [-id] <Int32> [[-name] <String>] [[-model_number] <String>] [[-category_id] <Int32>]
|
||||
[[-manufacturer_id] <Int32>] [[-eol] <Int32>] [[-custom_fieldset_id] <Int32>] [-url] <String>
|
||||
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
|
@ -25,13 +25,13 @@ 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
|
||||
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -151,7 +151,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
|
||||
|
|
@ -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] <Int32> [[-first_name] <String>] [[-last_name] <String>] [[-userName] <String>]
|
||||
Set-SnipeItUser [-id] <Int32> [[-first_name] <String>] [[-last_name] <String>] [[-userName] <String>]
|
||||
[[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>] [[-company_id] <Int32>]
|
||||
[[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>] [[-employee_num] <String>]
|
||||
[[-activated] <Boolean>] [[-notes] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
|
||||
|
|
@ -27,7 +27,7 @@ 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
|
||||
|
|
@ -50,7 +50,7 @@ Accept wildcard characters: False
|
|||
```
|
||||
|
||||
### -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
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
|
@ -245,7 +245,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
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
---
|
||||
external help file: SnipeItPS-help.xml
|
||||
Module Name: SnipeitPS
|
||||
online version:
|
||||
|
|
@ -61,7 +61,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
|
||||
|
|
@ -181,7 +181,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
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
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
|
||||
|
|
@ -11,105 +11,117 @@ Locale: {{ Update Locale }}
|
|||
{{ Fill in the Description }}
|
||||
|
||||
## 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)
|
||||
Gets a list of Snipe-it Models
|
||||
### [Get-SnipeItLicense](Get-SnipeItLicense.md)
|
||||
Gets a list of Snipe-it Licenses
|
||||
|
||||
### [Get-SnipeItLicenseSeat](Get-SnipeItLicenseSeat.md)
|
||||
Gets a list of Snipe-it Licenses Seats or specific Seat
|
||||
|
||||
### [Get-SnipeitLocation](Get-SnipeitLocation.md)
|
||||
Gets a list of Snipe-it Locations
|
||||
|
||||
### [Get-Status](Get-Status.md)
|
||||
### [Get-SnipeItModel](Get-SnipeItModel.md)
|
||||
Gets a list of Snipe-it Models
|
||||
|
||||
### [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)
|
||||
Removes Asset to Snipe-it asset system
|
||||
### [Remove-SnipeItAsset](Remove-SnipeItAsset.md)
|
||||
Removes Asset from 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)
|
||||
Updates Model on Snipe-it asset system
|
||||
### [Set-SnipeItLicenseSeat](Set-SnipeItLicenseSeat.md)
|
||||
Set license seat or checkout license seat
|
||||
|
||||
### [Set-SnipeitLocation](Set-SnipeitLocation.md)
|
||||
Updates Location in Snipe-it asset system
|
||||
|
||||
### [Set-User](Set-User.md)
|
||||
### [Set-SnipeItModel](Set-SnipeItModel.md)
|
||||
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 }}
|
||||
|
||||
|
|
|
|||
91
docs/Update-SnipeItAlias.md
Normal file
91
docs/Update-SnipeItAlias.md
Normal file
|
|
@ -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] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## 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
|
||||
Loading…
Add table
Reference in a new issue