mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-16 19:25:47 +00:00
Compare commits
No commits in common. "master" and "v1.10.211" have entirely different histories.
25 changed files with 32 additions and 503 deletions
|
|
@ -118,58 +118,6 @@ function Invoke-SnipeitMethod {
|
||||||
|
|
||||||
Write-Debug "$($Body | ConvertTo-Json)"
|
Write-Debug "$($Body | ConvertTo-Json)"
|
||||||
|
|
||||||
#Check throttle limit
|
|
||||||
if ($SnipeitPSSession.throttleLimit -gt 0) {
|
|
||||||
Write-Verbose "Check for request throttling"
|
|
||||||
Write-debug "ThrottleMode: $($SnipeitPSSession.throttleMode)"
|
|
||||||
Write-debug "ThrottleLimit: $($SnipeitPSSession.throttleLimit)"
|
|
||||||
Write-debug "ThrottlePeriod: $($SnipeitPSSession.throttlePeriod)"
|
|
||||||
Write-debug "ThrottleThreshold: $($SnipeitPSSession.throttleThreshold)"
|
|
||||||
Write-debug "Current count: $($SnipeitPSSession.throttledRequests.count)"
|
|
||||||
|
|
||||||
#current request timestamps in period
|
|
||||||
$SnipeitPSSession.throttledRequests = ($SnipeitPSSession.throttledRequests).where({$_ -gt (get-date).AddMilliseconds( 0 - $SnipeitPSSession.throttlePeriod).ToFileTime()})
|
|
||||||
|
|
||||||
#make sure that we alway have list here
|
|
||||||
if($null -eq $SnipeitPSSession.throttledRequests) {
|
|
||||||
$SnipeitPSSession.throttledRequests = [System.Collections.ArrayList]::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
$naptime = 0
|
|
||||||
switch ($SnipeitPSSession.throttleMode) {
|
|
||||||
"Burst" {
|
|
||||||
if ($SnipeitPSSession.throttledRequests.count -ge $SnipeitPSSession.throttleLimit) {
|
|
||||||
$naptime = [Math]::Round(((get-date).ToFileTime() - ($SnipeitPSSession.throttledRequests[0]))/10000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
"Constant" {
|
|
||||||
$prevrequesttime =[Math]::Round(((get-date).ToFileTime() - ($SnipeitPSSession.throttledRequests[$SnipeitPSSession.throttledRequests.count - 1]))/10000)
|
|
||||||
$naptime = [Math]::Round($SnipeitPSSession.throttlePeriod / $SnipeitPSSession.throttleLimit) - $prevrequesttime
|
|
||||||
}
|
|
||||||
|
|
||||||
"Adaptive" {
|
|
||||||
$unThrottledRequests = $SnipeitPSSession.throttleLimit * ($SnipeitPSSession.throttleThreshold / 100)
|
|
||||||
if($SnipeitPSSession.throttledRequests.count -ge $unThrottledRequests) {
|
|
||||||
#calculate time left in throttlePeriod and devide it for remaining requests
|
|
||||||
$remaining = $SnipeitPSSession.throttleLimit - $SnipeitPSSession.throttledRequests.count
|
|
||||||
if ($remaining -lt 1) {
|
|
||||||
$remaining = 1
|
|
||||||
}
|
|
||||||
$naptime = [Math]::Round((((get-date).ToFileTime() - ($SnipeitPSSession.throttledRequests[0]))/ 10000) / $remaining)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Do we need a nap
|
|
||||||
if ($naptime -gt 0) {
|
|
||||||
Write-verbose "Throttling request for $naptime ms"
|
|
||||||
Start-Sleep -Milliseconds $naptime
|
|
||||||
}
|
|
||||||
|
|
||||||
$SnipeitPSSession.throttledRequests.Add((Get-Date).ToFileTime())
|
|
||||||
}
|
|
||||||
|
|
||||||
# Invoke the API
|
# Invoke the API
|
||||||
try {
|
try {
|
||||||
Write-Verbose "[$($MyInvocation.MyCommand.Name)] Invoking method $Method to URI $URi"
|
Write-Verbose "[$($MyInvocation.MyCommand.Name)] Invoking method $Method to URI $URi"
|
||||||
|
|
@ -196,10 +144,6 @@ function Invoke-SnipeitMethod {
|
||||||
# This could be handled nicely in an function such as:
|
# This could be handled nicely in an function such as:
|
||||||
# ResolveError $response -WriteError
|
# ResolveError $response -WriteError
|
||||||
Write-Error $($webResponse.messages | Out-String)
|
Write-Error $($webResponse.messages | Out-String)
|
||||||
} elseif ( $webResponse.StatusCode -eq 'Unauthorized') {
|
|
||||||
Write-Verbose "[$($MyInvocation.MyCommand.Name)] An Unauthorized response was received"
|
|
||||||
Write-Error "Cannot connect to Snipe It: Unauthorized."
|
|
||||||
return $false
|
|
||||||
} else {
|
} else {
|
||||||
#update operations return payload
|
#update operations return payload
|
||||||
if ($webResponse.payload) {
|
if ($webResponse.payload) {
|
||||||
|
|
|
||||||
|
|
@ -20,22 +20,6 @@
|
||||||
PSCredential where username shoul be snipe it url and password should be
|
PSCredential where username shoul be snipe it url and password should be
|
||||||
snipe it apikey.
|
snipe it apikey.
|
||||||
|
|
||||||
.PARAMETER throttleLimit
|
|
||||||
Throttle request rate to nro of requests per throttlePeriod. Defaults to 0 that means no requests are not throttled.
|
|
||||||
|
|
||||||
.PARAMETER throttlePeriod
|
|
||||||
Throttle period time span in milliseconds defaults to 60 milliseconds.
|
|
||||||
|
|
||||||
.PARAMETER throttleThreshold
|
|
||||||
Threshold percentage of used request on period after request are throttled.
|
|
||||||
|
|
||||||
.PARAMETER throttleMode
|
|
||||||
RequestThrottling type. "Burst" allows all requests to be used in ThrottlePeriod without delays and then waits
|
|
||||||
until there's new requests avalable. With "Contant" mode there always delay between requests. Delay is calculated
|
|
||||||
by dividing throttlePeriod with throttleLimit. "Adaptive" mode allows throttleThreshold percentage of request to be
|
|
||||||
used with out delay, after threshold limit is reached next requests are delayded by dividing available requests
|
|
||||||
over throttlePeriod.
|
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Connect-SnipeitPS -Url $url -apiKey $myapikey
|
Connect-SnipeitPS -Url $url -apiKey $myapikey
|
||||||
Connect to Snipe it api.
|
Connect to Snipe it api.
|
||||||
|
|
@ -77,28 +61,7 @@ function Connect-SnipeitPS {
|
||||||
[SecureString]$secureApiKey,
|
[SecureString]$secureApiKey,
|
||||||
|
|
||||||
[Parameter(ParameterSetName='Connect with credential',Mandatory=$true)]
|
[Parameter(ParameterSetName='Connect with credential',Mandatory=$true)]
|
||||||
[PSCredential]$siteCred,
|
[PSCredential]$siteCred
|
||||||
|
|
||||||
[Parameter(ParameterSetName='Connect with url and apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with url and secure apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with credential',Mandatory=$false)]
|
|
||||||
[int]$throttleLimit,
|
|
||||||
|
|
||||||
[Parameter(ParameterSetName='Connect with url and apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with url and secure apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with credential',Mandatory=$false)]
|
|
||||||
[int]$throttlePeriod,
|
|
||||||
|
|
||||||
[Parameter(ParameterSetName='Connect with url and apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with url and secure apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with credential',Mandatory=$false)]
|
|
||||||
[int]$throttleThreshold,
|
|
||||||
|
|
||||||
[Parameter(ParameterSetName='Connect with url and apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with url and secure apikey',Mandatory=$false)]
|
|
||||||
[Parameter(ParameterSetName='Connect with credential',Mandatory=$false)]
|
|
||||||
[ValidateSet("Burst","Constant","Adaptive")]
|
|
||||||
[string]$throttleMode
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -123,21 +86,6 @@ function Connect-SnipeitPS {
|
||||||
$SnipeitPSSession.apiKey = $siteCred.GetNetworkCredential().SecurePassword
|
$SnipeitPSSession.apiKey = $siteCred.GetNetworkCredential().SecurePassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($null -eq $throttleLimit) { $throttleLimit = 0}
|
|
||||||
$SnipeitPSSession.throttleLimit = $throttleLimit
|
|
||||||
|
|
||||||
if($throttleThreshold -lt 1) { $throttleThreshold = 90}
|
|
||||||
$SnipeitPSSession.throttleThreshold = $throttleThreshold
|
|
||||||
|
|
||||||
if('' -eq $throttleMode) { $throttleMode = "Burst"}
|
|
||||||
$SnipeitPSSession.throttleMode = $throttleMode
|
|
||||||
|
|
||||||
if ($SnipeitPSSession.throttleLimit -gt 0) {
|
|
||||||
if($null -eq $throttlePeriod) { $throttlePeriod = 60000}
|
|
||||||
$SnipeitPSSession.throttlePeriod = $throttlePeriod
|
|
||||||
|
|
||||||
$SnipeitPSSession.throttledRequests = [System.Collections.ArrayList]::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Debug "Site-url $($SnipeitPSSession.url)"
|
Write-Debug "Site-url $($SnipeitPSSession.url)"
|
||||||
Write-Debug "Site apikey: $($SnipeitPSSession.apiKey)"
|
Write-Debug "Site apikey: $($SnipeitPSSession.apiKey)"
|
||||||
|
|
|
||||||
|
|
@ -8,24 +8,9 @@ Gets a list of Snipe-it Accessories
|
||||||
.PARAMETER search
|
.PARAMETER search
|
||||||
A text string to search the Accessory data
|
A text string to search the Accessory data
|
||||||
|
|
||||||
.PARAMETER user_id
|
|
||||||
Return Accessories checked out to user id
|
|
||||||
|
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Accessory
|
A id of specific Accessory
|
||||||
|
|
||||||
.PARAMETER company_id
|
|
||||||
Optionally restrict Accessory results to this company_id field
|
|
||||||
|
|
||||||
.PARAMETER category_id
|
|
||||||
Optionally restrict Accessory results to this category_id field
|
|
||||||
|
|
||||||
.PARAMETER manufacturer_id
|
|
||||||
Optionally restrict Accessory results to this manufacturer_id field
|
|
||||||
|
|
||||||
.PARAMETER supplier_id
|
|
||||||
Optionally restrict Accessory results to this supplier_id field
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,6 @@ Retrieve a list of assets that are due for auditing soon.
|
||||||
.PARAMETER audit_overdue
|
.PARAMETER audit_overdue
|
||||||
Retrieve a list of assets that are overdue for auditing.
|
Retrieve a list of assets that are overdue for auditing.
|
||||||
|
|
||||||
.PARAMETER user_id
|
|
||||||
Retrieve a list of assets checked out to user id.
|
|
||||||
|
|
||||||
.PARAMETER component_id
|
|
||||||
Retrieve a list of assets assigned this component id.
|
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict asset results to this asset name
|
|
||||||
|
|
||||||
.PARAMETER order_number
|
.PARAMETER order_number
|
||||||
Optionally restrict asset results to this order number
|
Optionally restrict asset results to this order number
|
||||||
|
|
||||||
|
|
@ -47,22 +38,12 @@ Optionally restrict asset results to this company ID
|
||||||
.PARAMETER location_id
|
.PARAMETER location_id
|
||||||
Optionally restrict asset results to this location ID
|
Optionally restrict asset results to this location ID
|
||||||
|
|
||||||
.PARAMETER depreciation_id
|
|
||||||
Optionally restrict asset results to this depreciation ID
|
|
||||||
|
|
||||||
.PARAMETER requestable
|
|
||||||
Optionally restrict asset results to those set as requestable
|
|
||||||
|
|
||||||
.PARAMETER status
|
.PARAMETER status
|
||||||
Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable
|
Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable
|
||||||
|
|
||||||
.PARAMETER status_id
|
.PARAMETER status_id
|
||||||
Optionally restrict asset results to this status label ID
|
Optionally restrict asset results to this status label ID
|
||||||
|
|
||||||
.PARAMETER customfields
|
|
||||||
Hastable of custom fields and extra fields for searching assets in Snipe-It.
|
|
||||||
Use internal field names from Snipe-It. You can use Get-CustomField to get internal field names.
|
|
||||||
|
|
||||||
.PARAMETER sort
|
.PARAMETER sort
|
||||||
Specify the column name you wish to sort by
|
Specify the column name you wish to sort by
|
||||||
|
|
||||||
|
|
@ -151,9 +132,6 @@ function Get-SnipeitAsset() {
|
||||||
[parameter(ParameterSetName='Assets with component id')]
|
[parameter(ParameterSetName='Assets with component id')]
|
||||||
[int]$component_id,
|
[int]$component_id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[string]$order_number,
|
[string]$order_number,
|
||||||
|
|
||||||
|
|
@ -184,9 +162,6 @@ function Get-SnipeitAsset() {
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[int]$status_id,
|
[int]$status_id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[hashtable]$customfields,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[parameter(ParameterSetName='Assets due auditing soon')]
|
[parameter(ParameterSetName='Assets due auditing soon')]
|
||||||
[parameter(ParameterSetName='Assets overdue for auditing')]
|
[parameter(ParameterSetName='Assets overdue for auditing')]
|
||||||
|
|
@ -236,15 +211,6 @@ function Get-SnipeitAsset() {
|
||||||
|
|
||||||
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
|
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
|
||||||
|
|
||||||
# Add in custom fields.
|
|
||||||
if ($customfields.Count -gt 0) {
|
|
||||||
foreach ($pair in $customfields.GetEnumerator()) {
|
|
||||||
if (-Not $SearchParameter.ContainsKey($pair.Name)) {
|
|
||||||
$SearchParameter.Add($pair.Name, $pair.Value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($PsCmdlet.ParameterSetName) {
|
switch ($PsCmdlet.ParameterSetName) {
|
||||||
'Search' { $api = "/api/v1/hardware" }
|
'Search' { $api = "/api/v1/hardware" }
|
||||||
'Get with id' {$api= "/api/v1/hardware/$id"}
|
'Get with id' {$api= "/api/v1/hardware/$id"}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ A text string to search the Categories data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Category
|
A id of specific Category
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict Category results to this Category name.
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -43,9 +40,6 @@ function Get-SnipeitCategory() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ A text string to search the Companies data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Company
|
A id of specific Company
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict company results to this company name.
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -44,9 +41,6 @@ function Get-SnipeitCompany() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,6 @@ A text string to search the Components data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Component
|
A id of specific Component
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict Component results to this name field
|
|
||||||
|
|
||||||
.PARAMETER company_id
|
|
||||||
Optionally restrict Component results to this company_id field
|
|
||||||
|
|
||||||
.PARAMETER category_id
|
|
||||||
Optionally restrict Component results to this category_id field
|
|
||||||
|
|
||||||
.PARAMETER location_id
|
|
||||||
Optionally restrict Component results to this location_id field
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -57,9 +45,6 @@ function Get-SnipeitComponent() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[int]$category_id,
|
[int]$category_id,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ A text string to search the consumables
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific consumable
|
A id of specific consumable
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict consumable results to this name field
|
|
||||||
|
|
||||||
.PARAMETER company_id
|
.PARAMETER company_id
|
||||||
Id number of company
|
Id number of company
|
||||||
|
|
||||||
|
|
@ -66,9 +63,6 @@ function Get-SnipeitConsumable() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int[]]$id,
|
[int[]]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[int]$category_id,
|
[int]$category_id,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,6 @@ A text string to search the Departments data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Department
|
A id of specific Department
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict department results to this department name.
|
|
||||||
|
|
||||||
.PARAMETER manager_id
|
|
||||||
Optionally restrict department results to this manager ID.
|
|
||||||
|
|
||||||
.PARAMETER company_id
|
|
||||||
Optionally restrict department results to this company ID.
|
|
||||||
|
|
||||||
.PARAMETER location_id
|
|
||||||
Optionally restrict department results to this location ID.
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -55,18 +43,6 @@ function Get-SnipeitDepartment() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$manager_id,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$company_id,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$location_id,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -8,24 +8,6 @@ A text string to search the Locations data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Location
|
A id of specific Location
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict Location results to this Location name.
|
|
||||||
|
|
||||||
.PARAMETER address
|
|
||||||
Optionally restrict Location results to this Location address.
|
|
||||||
|
|
||||||
.PARAMETER address2
|
|
||||||
Optionally restrict Location results to this Location address2.
|
|
||||||
|
|
||||||
.PARAMETER city
|
|
||||||
Optionally restrict Location results to this Location city.
|
|
||||||
|
|
||||||
.PARAMETER zip
|
|
||||||
Optionally restrict Location results to this Location zip.
|
|
||||||
|
|
||||||
.PARAMETER country
|
|
||||||
Optionally restrict Location results to this Location country.
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -58,24 +40,6 @@ function Get-SnipeitLocation() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$address,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$address2,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$city,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$zip,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$country,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Manufactuter
|
A id of specific Manufactuter
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict Manufacturer results to this name field
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -44,9 +41,6 @@ function Get-SnipeitManufacturer() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ A text string to search the Status Labels data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Status Label
|
A id of specific Status Label
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict Status Label results to this name field
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -43,9 +40,6 @@ function Get-SnipeitStatus() {
|
||||||
[parameter(ParameterSetName='Get with ID')]
|
[parameter(ParameterSetName='Get with ID')]
|
||||||
[int]$id,
|
[int]$id,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -8,33 +8,6 @@ A text string to search the Supliers data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific Suplier
|
A id of specific Suplier
|
||||||
|
|
||||||
.PARAMETER name
|
|
||||||
Optionally restrict Supplier results to this Supplier name.
|
|
||||||
|
|
||||||
.PARAMETER address
|
|
||||||
Optionally restrict Supplier results to this Supplier address.
|
|
||||||
|
|
||||||
.PARAMETER address2
|
|
||||||
Optionally restrict Supplier results to this Supplier address2.
|
|
||||||
|
|
||||||
.PARAMETER city
|
|
||||||
Optionally restrict Supplier results to this Supplier city.
|
|
||||||
|
|
||||||
.PARAMETER zip
|
|
||||||
Optionally restrict Supplier results to this Supplier zip.
|
|
||||||
|
|
||||||
.PARAMETER country
|
|
||||||
Optionally restrict Supplier results to this Supplier country.
|
|
||||||
|
|
||||||
.PARAMETER fax
|
|
||||||
Optionally restrict Supplier results to this Supplier fax number.
|
|
||||||
|
|
||||||
.PARAMETER email
|
|
||||||
Optionally restrict Supplier results to this Supplier email address.
|
|
||||||
|
|
||||||
.PARAMETER notes
|
|
||||||
Optionally restrict Supplier results to this Supplier notes field.
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
||||||
|
|
@ -70,33 +43,6 @@ function Get-SnipeitSupplier() {
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$name,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$address,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$address2,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$city,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$zip,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$country,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$fax,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$email,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$notes,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[int]$limit = 50,
|
[int]$limit = 50,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,56 +8,11 @@ A text string to search the User data
|
||||||
.PARAMETER id
|
.PARAMETER id
|
||||||
A id of specific User
|
A id of specific User
|
||||||
|
|
||||||
.PARAMETER accessory_id
|
|
||||||
Get users a specific accessory id has been checked out to
|
|
||||||
|
|
||||||
.PARAMETER username
|
.PARAMETER username
|
||||||
Optionally restrict User results to this username field
|
Search string for username field
|
||||||
|
|
||||||
.PARAMETER email
|
.PARAMETER email
|
||||||
Optionally restrict User results to this email field
|
Search string for email field
|
||||||
|
|
||||||
.PARAMETER employee_num
|
|
||||||
Optionally restrict User results to this employee_num field
|
|
||||||
|
|
||||||
.PARAMETER state
|
|
||||||
Optionally restrict User results to this state field
|
|
||||||
|
|
||||||
.PARAMETER country
|
|
||||||
Optionally restrict User results to this country field
|
|
||||||
|
|
||||||
.PARAMETER zip
|
|
||||||
Optionally restrict User results to this zip field
|
|
||||||
|
|
||||||
.PARAMETER company_id
|
|
||||||
Optionally restrict User results to this company_id field
|
|
||||||
|
|
||||||
.PARAMETER location_id
|
|
||||||
Optionally restrict User results to this location_id field
|
|
||||||
|
|
||||||
.PARAMETER department_id
|
|
||||||
Optionally restrict User results to this department_id field
|
|
||||||
|
|
||||||
.PARAMETER deleted
|
|
||||||
Optionally restrict User results to deleted users only
|
|
||||||
|
|
||||||
.PARAMETER ldap_import
|
|
||||||
Optionally restrict User results to those with specified ldap_import value
|
|
||||||
|
|
||||||
.PARAMETER remote
|
|
||||||
Optionally restrict User results to those with specified remote worker value
|
|
||||||
|
|
||||||
.PARAMETER assets_count
|
|
||||||
Optionally restrict User results to those with the specified assets count
|
|
||||||
|
|
||||||
.PARAMETER licenses_count
|
|
||||||
Optionally restrict User results to those with the specified licenses count
|
|
||||||
|
|
||||||
.PARAMETER accessories_count
|
|
||||||
Optionally restrict User results to those with the specified accessories count
|
|
||||||
|
|
||||||
.PARAMETER consumables_count
|
|
||||||
Optionally restrict User results to those with the specified consumables count
|
|
||||||
|
|
||||||
.PARAMETER limit
|
.PARAMETER limit
|
||||||
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
|
||||||
|
|
@ -121,39 +76,6 @@ function Get-SnipeitUser() {
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[string]$email,
|
[string]$email,
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$employee_num,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$state,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$zip,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[string]$country,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[Nullable[bool]]$deleted,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[Nullable[bool]]$ldap_import,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[Nullable[bool]]$remote,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$assets_count,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$licenses_count,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$accessories_count,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
|
||||||
[int]$consumables_count,
|
|
||||||
|
|
||||||
[parameter(ParameterSetName='Search')]
|
[parameter(ParameterSetName='Search')]
|
||||||
[ValidateSet("asc", "desc")]
|
[ValidateSet("asc", "desc")]
|
||||||
[string]$order = "desc",
|
[string]$order = "desc",
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,6 @@ Optional Purchase cost of the Asset
|
||||||
.PARAMETER purchase_date
|
.PARAMETER purchase_date
|
||||||
Optional Purchase cost of the Asset
|
Optional Purchase cost of the Asset
|
||||||
|
|
||||||
.PARAMETER supplier_id
|
|
||||||
Optional Supplier id of the Asset
|
|
||||||
|
|
||||||
|
|
||||||
.PARAMETER rtd_location_id
|
.PARAMETER rtd_location_id
|
||||||
Optional Default location id for the asset
|
Optional Default location id for the asset
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ Long description
|
||||||
.PARAMETER Tag
|
.PARAMETER Tag
|
||||||
The asset tag of the asset you wish to audit
|
The asset tag of the asset you wish to audit
|
||||||
|
|
||||||
.PARAMETER next_audit_date
|
|
||||||
Due date for the asset's next audit
|
|
||||||
|
|
||||||
.PARAMETER Location_id
|
.PARAMETER Location_id
|
||||||
ID of the location you want to associate with the audit
|
ID of the location you want to associate with the audit
|
||||||
|
|
||||||
|
|
@ -31,9 +28,6 @@ function New-SnipeitAudit() {
|
||||||
|
|
||||||
[int]$location_id,
|
[int]$location_id,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
|
||||||
[datetime]$next_audit_date,
|
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[string]$url,
|
[string]$url,
|
||||||
|
|
||||||
|
|
@ -52,10 +46,6 @@ function New-SnipeitAudit() {
|
||||||
$Values += @{"asset_tag" = $tag}
|
$Values += @{"asset_tag" = $tag}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($PSBoundParameters.ContainsKey('next_audit_date')) {
|
|
||||||
$Values += @{"next_audit_date" = ($next_audit_date).ToString("yyyy-MM-dd")}
|
|
||||||
}
|
|
||||||
|
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Api = "/api/v1/hardware/audit"
|
Api = "/api/v1/hardware/audit"
|
||||||
Method = 'Post'
|
Method = 'Post'
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,6 @@
|
||||||
.PARAMETER manager_id
|
.PARAMETER manager_id
|
||||||
ID number of manager
|
ID number of manager
|
||||||
|
|
||||||
.PARAMETER groups
|
|
||||||
ID numbers of groups
|
|
||||||
|
|
||||||
.PARAMETER employee_num
|
.PARAMETER employee_num
|
||||||
Employeenumber
|
Employeenumber
|
||||||
|
|
||||||
|
|
@ -106,8 +103,6 @@ function New-SnipeitUser() {
|
||||||
|
|
||||||
[int]$manager_id,
|
[int]$manager_id,
|
||||||
|
|
||||||
[int[]]$groups,
|
|
||||||
|
|
||||||
[string]$employee_num,
|
[string]$employee_num,
|
||||||
|
|
||||||
[bool]$ldap_import = $false,
|
[bool]$ldap_import = $false,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
.PARAMETER location_id
|
.PARAMETER location_id
|
||||||
Location id to change asset location to
|
Location id to change asset location to
|
||||||
|
|
||||||
.PARAMETER note
|
.PARAMETER notes
|
||||||
Notes about checkin
|
Notes about checkin
|
||||||
|
|
||||||
.PARAMETER url
|
.PARAMETER url
|
||||||
|
|
@ -37,7 +37,7 @@ function Reset-SnipeitAssetOwner() {
|
||||||
|
|
||||||
[int]$location_id,
|
[int]$location_id,
|
||||||
|
|
||||||
[string]$note,
|
[string]$notes,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[string]$url,
|
[string]$url,
|
||||||
|
|
@ -49,7 +49,7 @@ function Reset-SnipeitAssetOwner() {
|
||||||
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
|
||||||
|
|
||||||
$Values = @{
|
$Values = @{
|
||||||
"note" = $note
|
"notes" = $notes
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($PSBoundParameters.ContainsKey('location_id')) { $Values.Add("location_id", $location_id) }
|
if ($PSBoundParameters.ContainsKey('location_id')) { $Values.Add("location_id", $location_id) }
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,6 @@
|
||||||
.PARAMETER purchase_date
|
.PARAMETER purchase_date
|
||||||
Date of asset purchase
|
Date of asset purchase
|
||||||
|
|
||||||
.PARAMETER supplier_id
|
|
||||||
Supplier id of the Asset
|
|
||||||
|
|
||||||
.PARAMETER requestable
|
.PARAMETER requestable
|
||||||
Whether or not the asset can be requested by users with the permission to request assets
|
Whether or not the asset can be requested by users with the permission to request assets
|
||||||
|
|
||||||
|
|
@ -125,9 +122,6 @@ function Set-SnipeitAsset() {
|
||||||
|
|
||||||
[datetime]$purchase_date,
|
[datetime]$purchase_date,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
|
||||||
[int]$supplier_id,
|
|
||||||
|
|
||||||
[bool]$requestable,
|
[bool]$requestable,
|
||||||
|
|
||||||
[bool]$archived,
|
[bool]$archived,
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,6 @@
|
||||||
.PARAMETER manager_id
|
.PARAMETER manager_id
|
||||||
ID number of manager
|
ID number of manager
|
||||||
|
|
||||||
.PARAMETER groups
|
|
||||||
ID numbers of groups
|
|
||||||
|
|
||||||
.PARAMETER employee_num
|
.PARAMETER employee_num
|
||||||
Employeenumber
|
Employeenumber
|
||||||
|
|
||||||
|
|
@ -113,16 +110,12 @@ function Set-SnipeitUser() {
|
||||||
|
|
||||||
[Nullable[System.Int32]]$manager_id,
|
[Nullable[System.Int32]]$manager_id,
|
||||||
|
|
||||||
[int[]]$groups,
|
|
||||||
|
|
||||||
[string]$employee_num,
|
[string]$employee_num,
|
||||||
|
|
||||||
[bool]$activated,
|
[bool]$activated,
|
||||||
|
|
||||||
[string]$notes,
|
[string]$notes,
|
||||||
|
|
||||||
[bool]$ldap_import,
|
|
||||||
|
|
||||||
[ValidateScript({Test-Path $_})]
|
[ValidateScript({Test-Path $_})]
|
||||||
[string]$image,
|
[string]$image,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -supplier_id
|
### -supplier_id
|
||||||
Optional Supplier id of the Asset
|
{{ Fill supplier_id Description }}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: Int32
|
Type: Int32
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ Add a new Audit to Snipe-it asset system
|
||||||
## SYNTAX
|
## SYNTAX
|
||||||
|
|
||||||
```
|
```
|
||||||
New-SnipeitAudit [-tag] <String> [[-location_id] <Int32>] [[-next_audit_date] <DateTime>] [[-url] <String>]
|
New-SnipeitAudit [-tag] <String> [[-location_id] <Int32>] [[-url] <String>] [[-apiKey] <String>] [-WhatIf]
|
||||||
[[-apiKey] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[-Confirm] [<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
@ -38,7 +38,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 5
|
Position: 4
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -59,21 +59,6 @@ Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -next_audit_date
|
|
||||||
Due date for the asset's next audit
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
Type: DateTime
|
|
||||||
Parameter Sets: (All)
|
|
||||||
Aliases:
|
|
||||||
|
|
||||||
Required: False
|
|
||||||
Position: 3
|
|
||||||
Default value: None
|
|
||||||
Accept pipeline input: False
|
|
||||||
Accept wildcard characters: False
|
|
||||||
```
|
|
||||||
|
|
||||||
### -tag
|
### -tag
|
||||||
The asset tag of the asset you wish to audit
|
The asset tag of the asset you wish to audit
|
||||||
|
|
||||||
|
|
@ -98,7 +83,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 4
|
Position: 3
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Checkin asset
|
||||||
## SYNTAX
|
## SYNTAX
|
||||||
|
|
||||||
```
|
```
|
||||||
Reset-SnipeitAssetOwner [-id] <Int32> [[-status_id] <Int32>] [[-location_id] <Int32>] [[-note] <String>]
|
Reset-SnipeitAssetOwner [-id] <Int32> [[-status_id] <Int32>] [[-location_id] <Int32>] [[-notes] <String>]
|
||||||
[[-url] <String>] [[-apiKey] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[[-url] <String>] [[-apiKey] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -note
|
### -notes
|
||||||
Notes about checkin
|
Notes about checkin
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ Update a specific Asset in the Snipe-it asset system
|
||||||
Set-SnipeitAsset [-id] <Int32[]> [[-asset_tag] <String>] [[-name] <String>] [[-status_id] <Int32>]
|
Set-SnipeitAsset [-id] <Int32[]> [[-asset_tag] <String>] [[-name] <String>] [[-status_id] <Int32>]
|
||||||
[[-model_id] <Int32>] [[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>]
|
[[-model_id] <Int32>] [[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>]
|
||||||
[[-serial] <String>] [[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>]
|
[[-serial] <String>] [[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>]
|
||||||
[[-purchase_date] <DateTime>] [[-supplier_id] <Int32>] [[-requestable] <Boolean>] [[-archived] <Boolean>]
|
[[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>]
|
||||||
[[-rtd_location_id] <Int32>] [[-notes] <String>] [[-RequestType] <String>] [[-image] <String>] [-image_delete]
|
[[-notes] <String>] [[-RequestType] <String>] [[-image] <String>] [-image_delete] [[-url] <String>]
|
||||||
[[-url] <String>] [[-apiKey] <String>] [[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[[-apiKey] <String>] [[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
@ -53,7 +53,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 22
|
Position: 21
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -69,7 +69,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 16
|
Position: 15
|
||||||
Default value: False
|
Default value: False
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -129,7 +129,7 @@ Parameter Sets: (All)
|
||||||
Aliases: CustomValues
|
Aliases: CustomValues
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 23
|
Position: 22
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -159,7 +159,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 20
|
Position: 19
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -234,7 +234,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 18
|
Position: 17
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -294,7 +294,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 15
|
Position: 14
|
||||||
Default value: False
|
Default value: False
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -310,7 +310,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 19
|
Position: 18
|
||||||
Default value: Patch
|
Default value: Patch
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -325,7 +325,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 17
|
Position: 16
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -361,21 +361,6 @@ Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -supplier_id
|
|
||||||
Supplier id of the Asset
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
Type: Int32
|
|
||||||
Parameter Sets: (All)
|
|
||||||
Aliases:
|
|
||||||
|
|
||||||
Required: False
|
|
||||||
Position: 14
|
|
||||||
Default value: 0
|
|
||||||
Accept pipeline input: False
|
|
||||||
Accept wildcard characters: False
|
|
||||||
```
|
|
||||||
|
|
||||||
### -url
|
### -url
|
||||||
Deprecated parameter, please use Connect-SnipeitPS instead.
|
Deprecated parameter, please use Connect-SnipeitPS instead.
|
||||||
URL of Snipeit system.
|
URL of Snipeit system.
|
||||||
|
|
@ -386,7 +371,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 21
|
Position: 20
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ Creates a new user
|
||||||
Set-SnipeitUser [-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>] [[-password] <String>] [[-company_id] <Int32>]
|
[[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>] [[-password] <String>] [[-company_id] <Int32>]
|
||||||
[[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>] [[-employee_num] <String>]
|
[[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>] [[-employee_num] <String>]
|
||||||
[[-activated] <Boolean>] [[-notes] <String>] [[-ldap_import] <Boolean>] [[-image] <String>] [-image_delete]
|
[[-activated] <Boolean>] [[-notes] <String>] [[-image] <String>] [-image_delete] [[-RequestType] <String>]
|
||||||
[[-RequestType] <String>] [[-url] <String>] [[-apiKey] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[[-url] <String>] [[-apiKey] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
@ -58,7 +58,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 20
|
Position: 19
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -163,7 +163,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 17
|
Position: 16
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -214,21 +214,6 @@ Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -ldap_import
|
|
||||||
Mark user as import from ldap
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
Type: Boolean
|
|
||||||
Parameter Sets: (All)
|
|
||||||
Aliases:
|
|
||||||
|
|
||||||
Required: False
|
|
||||||
Position: 16
|
|
||||||
Default value: False
|
|
||||||
Accept pipeline input: False
|
|
||||||
Accept wildcard characters: False
|
|
||||||
```
|
|
||||||
|
|
||||||
### -location_id
|
### -location_id
|
||||||
ID number of localtion
|
ID number of localtion
|
||||||
|
|
||||||
|
|
@ -314,7 +299,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 18
|
Position: 17
|
||||||
Default value: Patch
|
Default value: Patch
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
@ -330,7 +315,7 @@ Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: 19
|
Position: 18
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue