mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Fixed copypasted typo
This commit is contained in:
parent
953a3453fc
commit
608d8f04ca
12 changed files with 19 additions and 19 deletions
|
|
@ -117,7 +117,7 @@ function Get-Asset() {
|
|||
$SearchParameter = . Get-ParameterValue
|
||||
|
||||
|
||||
$apiuri = "$url/api/v1/hardware"
|
||||
$apiurl = "$url/api/v1/hardware"
|
||||
|
||||
if ($search -and ($asset_tag -or $asset_serial -or $id)) {
|
||||
Throw "[$($MyInvocation.MyCommand.Name)] Please specify only one of -search , -asset_tag or -asset_serial parameter"
|
||||
|
|
@ -127,25 +127,25 @@ function Get-Asset() {
|
|||
if ( $search -or $asset_serial -or $asset_tag) {
|
||||
Throw "[$($MyInvocation.MyCommand.Name)] Please specify only one of -search , -asset_tag or -asset_serial parameter"
|
||||
}
|
||||
$apiuri= "$url/api/v1/hardware/$id"
|
||||
$apiurl= "$url/api/v1/hardware/$id"
|
||||
}
|
||||
|
||||
if ($asset_tag) {
|
||||
if ( $search -or $asset_serial -or $id) {
|
||||
Throw "[$($MyInvocation.MyCommand.Name)] Please specify only one of -search , -asset_tag or -asset_serial parameter"
|
||||
}
|
||||
$apiuri= "$url/api/v1/hardware/bytag/$asset_tag"
|
||||
$apiurl= "$url/api/v1/hardware/bytag/$asset_tag"
|
||||
}
|
||||
|
||||
if ($asset_serial) {
|
||||
if ( $search -or $asset_tag) {
|
||||
Throw "[$($MyInvocation.MyCommand.Name)] Please specify only one of-search , -asset_tag or -asset_serial parameter"
|
||||
}
|
||||
$apiuri= "$url/api/v1/hardware/byserial/$asset_serial"
|
||||
$apiurl= "$url/api/v1/hardware/byserial/$asset_serial"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
Uri = "$apiuri"
|
||||
Uri = $apiurl
|
||||
Method = 'Get'
|
||||
GetParameters = $SearchParameter
|
||||
Token = $apiKey
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function Get-Category()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/categories/$id"
|
||||
$apiurl= "$url/api/v1/categories/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function Get-Company()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/companies/$id"
|
||||
$apiurl= "$url/api/v1/companies/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function Get-Component() {
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/components/$id"
|
||||
$apiurl= "$url/api/v1/components/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function Get-Department()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/departments/$id"
|
||||
$apiurl= "$url/api/v1/departments/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ function Get-License() {
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/licenses/$id"
|
||||
$apiurl= "$url/api/v1/licenses/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function Get-Manufacturer()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/manufacturers/$id"
|
||||
$apiurl= "$url/api/v1/manufacturers/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function Get-Model()
|
|||
Param(
|
||||
[string]$search,
|
||||
|
||||
[string]$id,
|
||||
[int]$id,
|
||||
|
||||
[ValidateSet("asc", "desc")]
|
||||
[string]$order = "desc",
|
||||
|
|
@ -52,14 +52,14 @@ function Get-Model()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/models/$id"
|
||||
$apiurl= "$url/api/v1/models/id/$id"
|
||||
}
|
||||
|
||||
write-host "ID $id, -- $SearchParameter"
|
||||
$Parameters = @{
|
||||
Uri = $apiurl
|
||||
Method = 'Get'
|
||||
Token = $apiKey
|
||||
GetParameters = $SearchParameter
|
||||
#GetParameters = $SearchParameter
|
||||
}
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function Get-SnipeitLocation()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/locations/$id"
|
||||
$apiurl= "$url/api/v1/locations/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function Get-Status()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/statuslabels/$id"
|
||||
$apiurl= "$url/api/v1/statuslabels/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function Get-Supplier()
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/suppliers/$id"
|
||||
$apiurl= "$url/api/v1/suppliers/$id"
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ function Get-User() {
|
|||
}
|
||||
|
||||
if ($id) {
|
||||
$apiuri= "$url/api/v1/users/$id"
|
||||
$apiurl= "$url/api/v1/users/$id"
|
||||
}
|
||||
$Parameters = @{
|
||||
Uri = $apiurl
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue