Merge pull request #144 from snazy2000/develop

Casesensitivity for file and function names
This commit is contained in:
Petri Asikainen 2021-06-08 22:16:16 +03:00 committed by GitHub
commit 2309dd682f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
108 changed files with 884 additions and 879 deletions

View file

@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### New features
Most of "Set" command accepts piped input. Piped objects "id" attribute
is used to select asset set values. Like
Get-SnipeItAsset -model_id 213 | Set-SnipeItAsset -notes 'This is nice!'
Get-SnipeitAsset -model_id 213 | Set-SnipeitAsset -notes 'This is nice!'
Set command accept id parameter as array, so its easier to set multiple items
in one run.
@ -29,7 +29,7 @@ needed
## More Activity
### New features
SnipeIt activity history is now searchable. So finding out checked out the
Snipeit activity history is now searchable. So finding out checked out the
assest its easy. Api support many different target or item types that can
be uses as filter. Searchable types are 'Accessory','Asset','AssetMaintenance'
,'AssetModel','Category','Company','Component','Consumable','CustomField',
@ -38,7 +38,7 @@ be uses as filter. Searchable types are 'Accessory','Asset','AssetMaintenance'
### New Functions
- Get-SnipeItActivity Get and search Snipe-It change history.
- Get-SnipeitActivity Get and search Snipe-It change history.
# [v1.3.x] - 2021-05-27
@ -46,43 +46,43 @@ be uses as filter. Searchable types are 'Accessory','Asset','AssetMaintenance'
## Checking out accessories
### New features
You can specify Put or Patch for Set-SnipeItAsset when updating assets.
Set-SnipeItLocation new -city parameter
You can specify Put or Patch for Set-SnipeitAsset when updating assets.
Set-SnipeitLocation new -city parameter
### New Functions
- Set-SnipeItAccessoryOwner checkout accessory
- Get-SnipeItAccessoryOwner list checkedout accessories
- Reset-SnipeItAccessoryOwner checkin accessory
- Set-SnipeitAccessoryOwner checkout accessory
- Get-SnipeitAccessoryOwner list checkedout accessories
- Reset-SnipeitAccessoryOwner checkin accessory
### Fixes
- Set-SnipeItAsset fixed datetime and name inputs #126,128
- Set-SnipeitAsset fixed datetime and name inputs #126,128
-
# [v1.2.x] - 2021-05-24
## Prefixing SnipeItPS
## Prefixing SnipeitPS
### New Features
All commands are now prefixed like Set-Info -> Set-SnipeItInfo.
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.
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
- 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
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:
### New features
- Powershell 7 compatibility. So you can use SnipeItPS on macos or linux .
- Powershell 7 compatibility. So you can use SnipeitPS on macos or linux .
- Get every asset, model, licence with snipeit id by using -id parameter
- Get assets also by -asset_tag -or serialnumber
- Get functions also return all results from snipe when using -all parameter (by @PetriAsi)

View file

@ -21,7 +21,7 @@ Update-Module SnipeitPS
# To use each session:
Import-Module SnipeitPS
Set-SnipeItInfo -URL 'https://asset.example.com' -apiKey 'tokenKey'
Set-SnipeitInfo -URL 'https://asset.example.com' -apiKey 'tokenKey'
```
### Usage
@ -29,7 +29,7 @@ Set-SnipeItInfo -URL 'https://asset.example.com' -apiKey 'tokenKey'
```powershell
# Review the help at any time!
Get-Command -Module SnipeitPS
Get-Help Get-SnipeItAsset -Full # or any other command
Get-Help Get-SnipeitAsset -Full # or any other command
```
### Reporting bugs and issues
Please use -Verbose switch with command you have problem with.

View file

@ -1,38 +0,0 @@
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';}
}

View 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';}
}

View file

@ -1,18 +0,0 @@
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
}

View 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
}

View file

@ -1,4 +1,4 @@
function Test-SnipeItAlias()
function Test-SnipeitAlias()
{
[CmdletBinding()]
param(
@ -9,7 +9,7 @@ function Test-SnipeItAlias()
)
if($invocationName -ne $commandName) {
Write-Warning "$invocationName is still working, but it has been superceded by $commandName, please use it instead."
Write-Warning 'To update your scripts you can use Update-SnipeItAlias helper function: '
Write-Warning '"Get-Content [your-script.ps1] | Update-SnipeItAlias | Out-File [new-script-name.ps1]"'
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]"'
}
}

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItAccessory -search Keyboard
Get-SnipeitAccessory -search Keyboard
.EXAMPLE
Get-SnipeItAccessory -id 1
Get-SnipeitAccessory -id 1
#>
function Get-SnipeItAccessory() {
function Get-SnipeitAccessory() {
Param(
[parameter(ParameterSetName='Search')]
[string]$search,
@ -76,7 +76,7 @@ function Get-SnipeItAccessory() {
[parameter(mandatory = $true)]
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
if ($id -and $search){
throw "Please specify only one of -id or -search parameter"
@ -103,7 +103,7 @@ function Get-SnipeItAccessory() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItAccessory @callargs
$res=Get-SnipeitAccessory @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -8,15 +8,15 @@
Unique ID For accessory to list
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItAccessoryOwner -id 1
Get-SnipeitAccessoryOwner -id 1
#>
function Get-SnipeItAccessoryOwner()
function Get-SnipeitAccessoryOwner()
{
[CmdletBinding(
SupportsShouldProcess = $true,

View file

@ -30,20 +30,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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItAccessory -search Keyboard
Get-SnipeitAccessory -search Keyboard
.EXAMPLE
Get-SnipeItAccessory -id 1
Get-SnipeitAccessory -id 1
#>
function Get-SnipeItActivity() {
function Get-SnipeitActivity() {
Param(
[string]$search,
@ -106,7 +106,7 @@ function Get-SnipeItActivity() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItActivity @callargs
$res=Get-SnipeitActivity @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -54,25 +54,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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItAsset -url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -url "https://assets.example.com"-token "token..."
.EXAMPLE
Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
.EXAMPLE
Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
.EXAMPLE
Get-SnipeItAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..."
#>
function Get-SnipeItAsset() {
function Get-SnipeitAsset() {
Param(
[parameter(ParameterSetName='Search')]
[string]$search,
@ -138,7 +138,7 @@ function Get-SnipeItAsset() {
[parameter(mandatory = $true)]
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -185,7 +185,7 @@ function Get-SnipeItAsset() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItAsset @callargs
$res=Get-SnipeitAsset @callargs
$res
if ( $res.count -lt $limit) {
break

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItAssetMaintenances -url "https://assets.example.com" -token "token..."
Get-SnipeitAssetMaintenances -url "https://assets.example.com" -token "token..."
.EXAMPLE
Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..."
Get-SnipeitAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..."
.EXAMPLE
Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..."
Get-SnipeitAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..."
#>
function Get-SnipeItAssetMaintenance() {
function Get-SnipeitAssetMaintenance() {
Param(
[string]$search,
@ -62,7 +62,7 @@ function Get-SnipeItAssetMaintenance() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -81,7 +81,7 @@ function Get-SnipeItAssetMaintenance() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItAssetMaintenance @callargs
$res=Get-SnipeitAssetMaintenance @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItCategory -id 1
Get-SnipeitCategory -id 1
.EXAMPLE
Get-SnipeItCategory -search "Laptop"
Get-SnipeitCategory -search "Laptop"
#>
function Get-SnipeItCategory()
function Get-SnipeitCategory()
{
Param(
[parameter(ParameterSetName='Search')]
@ -59,7 +59,7 @@ function Get-SnipeItCategory()
[parameter(mandatory = $true)]
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -88,7 +88,7 @@ function Get-SnipeItCategory()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItCategory @callargs
$res=Get-SnipeitCategory @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -17,22 +17,22 @@ 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
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItCompany
Get-SnipeitCompany
Gets all companies
.EXAMPLE
Get-SnipeItCompany -id 1
Get-SnipeitCompany -id 1
Gets specific company
#>
function Get-SnipeItCompany()
function Get-SnipeitCompany()
{
Param(
[parameter(ParameterSetName='Search')]
@ -61,7 +61,7 @@ function Get-SnipeItCompany()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -90,7 +90,7 @@ function Get-SnipeItCompany()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItCompany @callargs
$res=Get-SnipeitCompany @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -18,26 +18,26 @@ Offset to use
A return all results, works with -offset and other parameters
.PARAMETER url
URL of Snipeit system,can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItComponent
Get-SnipeitComponent
Returns all components
.EXAMPLE
Get-SnipeItComponent -search display
Get-SnipeitComponent -search display
Returns search results containeing string display
.EXAMPLE
Get-SnipeItComponent -id
Get-SnipeitComponent -id
Returns specific component
#>
function Get-SnipeItComponent() {
function Get-SnipeitComponent() {
Param(
[parameter(ParameterSetName='Search')]
[string]$search,
@ -78,7 +78,7 @@ function Get-SnipeItComponent() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -107,7 +107,7 @@ function Get-SnipeItComponent() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItComponent @callargs
$res=Get-SnipeitComponent @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -6,17 +6,17 @@
A id of specific field
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItCustomField -url "https://assets.example.com" -token "token..."
Get-SnipeitCustomField -url "https://assets.example.com" -token "token..."
#>
function Get-SnipeItCustomField()
function Get-SnipeitCustomField()
{
Param(
[int]$id,
@ -28,7 +28,7 @@ function Get-SnipeItCustomField()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
if ($id) {
$apiurl= "$url/api/v1/fields/$id"

View file

@ -18,23 +18,23 @@ Offset to use
A return all results, works with -offset and other parameters
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItDepartment -url "https://assets.example.com" -token "token..."
Get-SnipeitDepartment -url "https://assets.example.com" -token "token..."
.EXAMPLE
Get-SnipeItDepartment -search Department1
Get-SnipeitDepartment -search Department1
.EXAMPLE
Get-SnipeItDepartment -id 1
Get-SnipeitDepartment -id 1
#>
function Get-SnipeItDepartment()
function Get-SnipeitDepartment()
{
Param(
[parameter(ParameterSetName='Search')]
@ -67,7 +67,7 @@ function Get-SnipeItDepartment()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -96,7 +96,7 @@ function Get-SnipeItDepartment()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItDepartment @callargs
$res=Get-SnipeitDepartment @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -6,20 +6,20 @@ Returns a fieldset or list of Snipe-it Fieldsets
A id of specific fieldset
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItFieldset -url "https://assets.example.com" -token "token..."
Get-SnipeitFieldset -url "https://assets.example.com" -token "token..."
.EXAMPLE
Get-SnipeItFieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" }
Get-SnipeitFieldset -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Windows" }
#>
function Get-SnipeItFieldset() {
function Get-SnipeitFieldset() {
Param(
[int]$id,
@ -30,7 +30,7 @@ function Get-SnipeItFieldset() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
if ($id) {
$apiurl = "$url/api/v1/fieldsets/$id"

View file

@ -19,20 +19,20 @@ A return all results, works with -offset and other parameters
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItLicense -search SomeLicense
Get-SnipeitLicense -search SomeLicense
.EXAMPLE
Get-SnipeItLicense -id 1
Get-SnipeitLicense -id 1
#>
function Get-SnipeItLicense() {
function Get-SnipeitLicense() {
Param(
[parameter(ParameterSetName='Search')]
[string]$search,
@ -97,7 +97,7 @@ function Get-SnipeItLicense() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -126,7 +126,7 @@ function Get-SnipeItLicense() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItLicense @callargs
$res=Get-SnipeitLicense @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -22,18 +22,18 @@ A return all results, works with -offset and other parameters
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItLicenseSeat -id 1
Get-SnipeitLicenseSeat -id 1
#>
function Get-SnipeItLicenseSeat() {
function Get-SnipeitLicenseSeat() {
Param(
[parameter(mandatory = $true)]
@ -54,7 +54,7 @@ function Get-SnipeItLicenseSeat() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -80,7 +80,7 @@ function Get-SnipeItLicenseSeat() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItLicenseSeat @callargs
$res=Get-SnipeitLicenseSeat @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -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-SnipeItInfoeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
.PARAMETER apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItLocation -search Location1
Get-SnipeitLocation -search Location1
.EXAMPLE
Get-SnipeItLocation -id 3
Get-SnipeitLocation -id 3
#>
@ -60,7 +60,7 @@ function Get-SnipeitLocation()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -18,22 +18,22 @@ Offset to use
A return all results, works with -offset and other parameters
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItManufacturer -search HP
Get-SnipeitManufacturer -search HP
Search all manufacturers for string HP
.EXAMPLE
Get-SnipeItManufacturer -id 3
Get-SnipeitManufacturer -id 3
Returns manufacturer with id 3
#>
function Get-SnipeItManufacturer()
function Get-SnipeitManufacturer()
{
Param(
[parameter(ParameterSetName='Search')]
@ -62,7 +62,7 @@ function Get-SnipeItManufacturer()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -91,7 +91,7 @@ function Get-SnipeItManufacturer()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItManufacturer @callargs
$res=Get-SnipeitManufacturer @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItModel -search "DL380"
Get-SnipeitModel -search "DL380"
.EXAMPLE
Get-SnipeItModel -id 1
Get-SnipeitModel -id 1
#>
function Get-SnipeItModel()
function Get-SnipeitModel()
{
Param(
[parameter(ParameterSetName='Search')]
@ -60,7 +60,7 @@ function Get-SnipeItModel()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -89,7 +89,7 @@ function Get-SnipeItModel()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItModel @callargs
$res=Get-SnipeitModel @callargs
$res
if ($res.count -ne $limit ) {
break

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItStatus -search "Ready to Deploy"
Get-SnipeitStatus -search "Ready to Deploy"
.EXAMPLE
Get-SnipeItStatus -id 3
Get-SnipeitStatus -id 3
#>
function Get-SnipeItStatus()
function Get-SnipeitStatus()
{
Param(
[parameter(ParameterSetName='Search')]
@ -60,7 +60,7 @@ function Get-SnipeItStatus()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -89,7 +89,7 @@ function Get-SnipeItStatus()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItStatus @callargs
$res=Get-SnipeitStatus @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItSupplier -search MySupplier
Get-SnipeitSupplier -search MySupplier
.EXAMPLE
Get-SnipeItSupplier -id 2
Get-SnipeitSupplier -id 2
#>
function Get-SnipeItSupplier()
function Get-SnipeitSupplier()
{
Param(
[parameter(ParameterSetName='Search')]
@ -60,7 +60,7 @@ function Get-SnipeItSupplier()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -89,7 +89,7 @@ function Get-SnipeItSupplier()
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItSupplier @callargs
$res=Get-SnipeitSupplier @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Get-SnipeItUser -search SomeSurname
Get-SnipeitUser -search SomeSurname
.EXAMPLE
Get-SnipeItUser -id 3
Get-SnipeitUser -id 3
.EXAMPLE
Get-SnipeItUser -username someuser
Get-SnipeitUser -username someuser
.EXAMPLE
Get-SnipeItUser -email user@somedomain.com
Get-SnipeitUser -email user@somedomain.com
#>
function Get-SnipeItUser() {
function Get-SnipeitUser() {
Param(
[parameter(ParameterSetName='Search')]
[string]$search,
@ -88,7 +88,7 @@ function Get-SnipeItUser() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
@ -116,7 +116,7 @@ function Get-SnipeItUser() {
while ($true) {
$callargs['offset'] = $offstart
$callargs['limit'] = $limit
$res=Get-SnipeItUser @callargs
$res=Get-SnipeitUser @callargs
$res
if ($res.count -lt $limit) {
break

View file

@ -51,16 +51,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-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItAccessory -name "Accessory" -qty 3 -category_id 1
New-SnipeitAccessory -name "Accessory" -qty 3 -category_id 1
#>
function New-SnipeItAccessory() {
function New-SnipeitAccessory() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -105,7 +105,7 @@ function New-SnipeItAccessory() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -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-SnipeItInfo command
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
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-SnipeItAsset -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-SnipeItAsset -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-SnipeItAsset -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-SnipeItAsset()
function New-SnipeitAsset()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -123,7 +123,7 @@ function New-SnipeItAsset()
[hashtable] $customfields
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -31,15 +31,15 @@ Optional completion date
Optional cost
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItAssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01
New-SnipeitAssetMaintenence -asset_id 1 -supplier_id 1 -title "replace keyboard" -start_date 2021-01-01
#>
function New-SnipeItAssetMaintenance() {
function New-SnipeitAssetMaintenance() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -77,7 +77,7 @@ function New-SnipeItAssetMaintenance() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -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-SnipeItAudit -tag 1 -location_id 1
New-SnipeitAudit -tag 1 -location_id 1
#>
function New-SnipeItAudit()
function New-SnipeitAudit()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -37,7 +37,7 @@ function New-SnipeItAudit()
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"location_id" = $location_id

View file

@ -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-SnipeItInfo 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-SnipeItInfo 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-SnipeItCategory -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..."
New-SnipeitCategory -name "Laptops" -category_type asset -url "Snipe-IT URL here..." -apiKey "API key here..."
#>
function New-SnipeItCategory()
function New-SnipeitCategory()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -55,7 +55,7 @@ function New-SnipeItCategory()
[switch]$checkin_email
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"name" = $name

View file

@ -9,17 +9,17 @@ Creates new company on Snipe-It system
Comapany name
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItCompany -name "Acme Company"
New-SnipeitCompany -name "Acme Company"
#>
function New-SnipeItCompany()
function New-SnipeitCompany()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -37,7 +37,7 @@ function New-SnipeItCompany()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -27,10 +27,10 @@ Date accessory was purchased
Cost of item being purchased.
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
An example
@ -39,7 +39,7 @@ An example
General notes
#>
function New-SnipeItComponent() {
function New-SnipeitComponent() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -72,7 +72,7 @@ function New-SnipeItComponent() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -9,16 +9,16 @@
Name of the Custom Field
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset"
New-SnipeitCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset"
#>
function New-SnipeItCustomField()
function New-SnipeitCustomField()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -46,7 +46,7 @@ function New-SnipeItCustomField()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -18,17 +18,17 @@
ID number of manager
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItDepartment -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-SnipeItDepartment() {
function New-SnipeitDepartment() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -53,7 +53,7 @@ function New-SnipeItDepartment() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -57,17 +57,17 @@
Termination date for license.
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItLicence -name "License" -seats 3 -company_id 1
New-SnipeitLicence -name "License" -seats 3 -company_id 1
#>
function New-SnipeItLicense() {
function New-SnipeitLicense() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -124,7 +124,7 @@ function New-SnipeItLicense() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -39,16 +39,16 @@
The manager ID of the location
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItLocation -name "Room 1" -address "123 Asset Street" -parent_id 14
New-SnipeitLocation -name "Room 1" -address "123 Asset Street" -parent_id 14
#>
function New-SnipeItLocation() {
function New-SnipeitLocation() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -85,7 +85,7 @@ function New-SnipeItLocation() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -9,16 +9,16 @@
Name of the Manufacturer
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItManufacturer -name "HP"
New-SnipeitManufacturer -name "HP"
#>
function New-SnipeItManufacturer()
function New-SnipeitManufacturer()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -36,7 +36,7 @@ function New-SnipeItManufacturer()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"name" = $Name

View file

@ -21,16 +21,16 @@
Fieldset ID that the asset uses (Custom fields)
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
New-SnipeitModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
#>
function New-SnipeItModel()
function New-SnipeitModel()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -61,7 +61,7 @@ function New-SnipeItModel()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
name = $name

View file

@ -48,19 +48,19 @@
Mark user as import from ldap
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItuser -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-SnipeItUser() {
function New-SnipeitUser() {
[CmdletBinding(
SupportsShouldProcess = $true,
@ -109,7 +109,7 @@ function New-SnipeItUser() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -6,16 +6,16 @@
.PARAMETER ID
Unique ID For Asset to be removed
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Remove-SnipeItAsset -ID 44 -Verbose
Remove-SnipeitAsset -ID 44 -Verbose
#>
function Remove-SnipeItAsset ()
function Remove-SnipeitAsset ()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -32,7 +32,7 @@ function Remove-SnipeItAsset ()
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"ID" = $id

View file

@ -1,4 +1,4 @@
function Remove-SnipeItAssetMaintenance {
function Remove-SnipeitAssetMaintenance {
<#
.SYNOPSIS
Remove asset maintenance from Snipe-it asset system
@ -7,13 +7,13 @@ function Remove-SnipeItAssetMaintenance {
.PARAMETER ID
Unique ID of the asset maintenance to be removed
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Remove-SnipeItAssetMaintenance -ID 44 -url $url -apiKey $secret -Verbose
Remove-SnipeitAssetMaintenance -ID 44 -url $url -apiKey $secret -Verbose
#>
[CmdletBinding(
SupportsShouldProcess = $true,
@ -25,18 +25,18 @@ function Remove-SnipeItAssetMaintenance {
[int]
$id,
# SnipeIt URL
# Snipeit URL
[Parameter(Mandatory = $true)]
[string]
$url,
# SnipeIt ApiKey
# Snipeit ApiKey
[Parameter(Mandatory = $true)]
[string]
$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"ID" = $id

View file

@ -7,16 +7,16 @@
Unique ID For User to be removed
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose
Remove-SnipeitUser -ID 44 -url $url -apiKey $secret -Verbose
#>
function Remove-SnipeItUser ()
function Remove-SnipeitUser ()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -33,7 +33,7 @@ function Remove-SnipeItUser ()
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"ID" = $id

View file

@ -7,25 +7,25 @@
.PARAMETER assigned_pivot_id
This is the assigned_pivot_id of the accessory+user relationships in the accessories_users table
Use Get-SnipeItAccessoryOwner to find out nooded value
Use Get-SnipeitAccessoryOwner to find out nooded value
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
To get the accessories_users table for specific accessory id number
Get-SnipeItAccessoryOwner -id 1
Get-SnipeitAccessoryOwner -id 1
Thenselect assigned_pivot_id for userid you like check in
Get-SnipeItAccessoryOwner -assigned_pivot_id xxx
Get-SnipeitAccessoryOwner -assigned_pivot_id xxx
#>
function Reset-SnipeItAccessoryOwner()
function Reset-SnipeitAccessoryOwner()
{
[CmdletBinding(
SupportsShouldProcess = $true,

View file

@ -17,15 +17,15 @@
Notes about checkin
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo 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-SnipeItInfoeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfoeItInfo command
.EXAMPLE
Remove-SnipeItUser -ID 44 -url $url -apiKey $secret -Verbose
Remove-SnipeitUser -ID 44 -url $url -apiKey $secret -Verbose
#>
function Reset-SnipeItAssetOwner() {
function Reset-SnipeitAssetOwner() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Medium"
@ -48,7 +48,7 @@ function Reset-SnipeItAssetOwner() {
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = @{
"notes" = $notes

View file

@ -51,16 +51,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-SnipeItInfoeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
.PARAMETER apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfoeItInfoeItInfo command
.EXAMPLE
Set-SnipeItAccessory -id 1 -qty 3
Set-SnipeitAccessory -id 1 -qty 3
#>
function Set-SnipeItAccessory() {
function Set-SnipeitAccessory() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -104,7 +104,7 @@ function Set-SnipeItAccessory() {
)
begin {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -14,15 +14,15 @@
Notes about checkout
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Set-SnipeItAccessoryOwner -id 1 -assigned_id 1 -note "testing check out to user"
Set-SnipeitAccessoryOwner -id 1 -assigned_id 1 -note "testing check out to user"
#>
function Set-SnipeItAccessoryOwner()
function Set-SnipeitAccessoryOwner()
{
[CmdletBinding(
SupportsShouldProcess = $true,

View file

@ -57,25 +57,25 @@
Http request type to send Snipe IT system. Defaults to Put youc use Patch if needed
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
.PARAMETER apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo 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-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1"
Set-SnipeitAsset -id 1 -status_id 1 -model_id 1 -name "Machine1"
.EXAMPLE
Set-SnipeItAsset -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" }
.EXAMPLE
Get-SnipeItAsset -serial 12345678 | Set-SnipeItAsset -notes 'Just updated'
Get-SnipeitAsset -serial 12345678 | Set-SnipeitAsset -notes 'Just updated'
#>
function Set-SnipeItAsset()
function Set-SnipeitAsset()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -130,7 +130,7 @@ function Set-SnipeItAsset()
[hashtable] $customfields
)
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -25,15 +25,15 @@
Optional date to override the checkout time of now
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Set-SnipeItAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing check out to user"
Set-SnipeitAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing check out to user"
#>
function Set-SnipeItAssetOwner()
function Set-SnipeitAssetOwner()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -66,7 +66,7 @@ function Set-SnipeItAssetOwner()
)
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -30,10 +30,10 @@ Date accessory was purchased
Cost of item being purchased.
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
An example
@ -41,7 +41,7 @@ An example
.NOTES
General notes
#>
function Set-SnipeItComponent()
function Set-SnipeitComponent()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -75,7 +75,7 @@ function Set-SnipeItComponent()
[string]$apiKey
)
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -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-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Set-SnipeItInfo -url $url -apiKey -Verbose
Set-SnipeitInfo -url $url -apiKey -Verbose
#>
function Set-SnipeItInfo {
function Set-SnipeitInfo {
[CmdletBinding()]
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', '')]
param (
@ -23,7 +23,7 @@ function Set-SnipeItInfo {
)
BEGIN {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
function Add-DefaultParameter {
param(
[Parameter(Mandatory = $true)]

View file

@ -60,17 +60,17 @@
Termination date for license.
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Set-SnipeItLicence -name "License" -seats 3 -company_id 1
Set-SnipeitLicence -name "License" -seats 3 -company_id 1
#>
function Set-SnipeItLicense() {
function Set-SnipeitLicense() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Low"
@ -130,7 +130,7 @@ function Set-SnipeItLicense() {
[string]$apiKey
)
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -17,21 +17,21 @@
Notes about checkout
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
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
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
Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id 3 -Verbose
Checkout licence to asset id 3
#>
function Set-SnipeItLicenseSeat()
function Set-SnipeitLicenseSeat()
{
[CmdletBinding(
SupportsShouldProcess = $true,

View file

@ -45,10 +45,10 @@
Parent location as id
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Set-SnipeitLocation -id 123 -name "Some storage" -parent_id 100
@ -96,7 +96,7 @@ function Set-SnipeitLocation() {
)
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -24,16 +24,16 @@
Fieldset ID that the asset uses (Custom fields)
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo command
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
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
New-SnipeItModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
New-SnipeitModel -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
#>
function Set-SnipeItModel() {
function Set-SnipeitModel() {
[CmdletBinding(
SupportsShouldProcess = $true,
ConfirmImpact = "Medium"
@ -66,7 +66,7 @@ function Set-SnipeItModel() {
)
begin {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -51,19 +51,19 @@
Mark user as import from ldap
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeItInfo 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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE
Update-SnipeItUser -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-SnipeItUser() {
function Set-SnipeitUser() {
[CmdletBinding(
SupportsShouldProcess = $true,
@ -112,7 +112,7 @@ function Set-SnipeItUser() {
[string]$apiKey
)
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters

View file

@ -1,22 +1,22 @@
<#
.SYNOPSIS
Replaces old SnipeItPS commands with new ones
Replaces old SnipeitPS commands with new ones
.DESCRIPTION
Replaces old SnipeItPS commands with new ones
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]
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()
function Update-SnipeitAlias()
{
[CmdletBinding(
SupportsShouldProcess = $true,
@ -30,17 +30,17 @@ function Update-SnipeItAlias()
$String
)
begin{
Write-Verbose "Replacing old SnipeIt fuctions with new ones.. "
$SnipeItAliases = Get-SnipeItAlias
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]
ForEach ($key in $SnipeitAliases.Keys ) {
#Write-Verbose "Replacing $key with $($SnipeitAliases[$key])"
$result = $result -replace $key, $SnipeitAliases[$key]
}
$result
}

View file

@ -1,5 +1,5 @@
#
# Module manifest for module 'SnipeItPS'
# Module manifest for module 'SnipeitPS'
#
# Generated by: Stephen Maunder
#
@ -9,7 +9,7 @@
@{
# Script module or binary module file associated with this manifest.
RootModule = 'SnipeItPS'
RootModule = 'SnipeitPS'
# Version number of this module.
ModuleVersion = '1.5'
@ -30,7 +30,7 @@ CompanyName = 'Unknown'
Copyright = '(c) 2017 Stephen Maunder. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Powershell API for SnipeIt Asset Management'
Description = 'Powershell API for Snipeit Asset Management'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
@ -70,52 +70,52 @@ PowerShellVersion = '3.0'
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @(
'Get-SnipeItAsset',
'Get-SnipeItAssetMaintenance',
'Get-SnipeItCategory',
'Get-SnipeItCompany',
'Get-SnipeItComponent',
'Get-SnipeItCustomField',
'Get-SnipeItDepartment',
'Get-SnipeItFieldset',
'Get-SnipeitAsset',
'Get-SnipeitAssetMaintenance',
'Get-SnipeitCategory',
'Get-SnipeitCompany',
'Get-SnipeitComponent',
'Get-SnipeitCustomField',
'Get-SnipeitDepartment',
'Get-SnipeitFieldset',
'Get-SnipeitLocation',
'Get-SnipeItManufacturer',
'Get-SnipeItModel',
'Get-SnipeItStatus',
'Get-SnipeItSupplier',
'Get-SnipeItUser',
'New-SnipeItAsset',
'New-SnipeItAssetMaintenance',
'New-SnipeItCategory',
'New-SnipeItComponent',
'New-SnipeItCustomField',
'New-SnipeItDepartment',
'New-SnipeItLicense',
'Set-SnipeItLicense',
'Get-SnipeItLicense',
'Get-SnipeItLicenseSeat',
'Set-SnipeItLicenseSeat',
'New-SnipeItLocation',
'New-SnipeItManufacturer',
'New-SnipeItModel',
'New-SnipeItUser',
'Set-SnipeItAsset',
'Set-SnipeItAssetOwner',
'Set-SnipeItComponent',
'Set-SnipeItModel',
'Set-SnipeItInfo',
'Set-SnipeItUser',
'Set-SnipeItLocation',
'Add-SnipeItAccessory',
'Set-SnipeItAccessory',
'Get-SnipeItAccessory',
'Remove-SnipeItAsset',
'Remove-SnipeItUser',
'Update-SnipeItAlias',
'Set-SnipeItAccessoryOwner',
'Get-SnipeItAccessoryOwner',
'Reset-SnipeItAccessoryOwner',
'Get-SnipeItActivity'
'Get-SnipeitManufacturer',
'Get-SnipeitModel',
'Get-SnipeitStatus',
'Get-SnipeitSupplier',
'Get-SnipeitUser',
'New-SnipeitAsset',
'New-SnipeitAssetMaintenance',
'New-SnipeitCategory',
'New-SnipeitComponent',
'New-SnipeitCustomField',
'New-SnipeitDepartment',
'New-SnipeitLicense',
'Set-SnipeitLicense',
'Get-SnipeitLicense',
'Get-SnipeitLicenseSeat',
'Set-SnipeitLicenseSeat',
'New-SnipeitLocation',
'New-SnipeitManufacturer',
'New-SnipeitModel',
'New-SnipeitUser',
'Set-SnipeitAsset',
'Set-SnipeitAssetOwner',
'Set-SnipeitComponent',
'Set-SnipeitModel',
'Set-SnipeitInfo',
'Set-SnipeitUser',
'Set-SnipeitLocation',
'Add-SnipeitAccessory',
'Set-SnipeitAccessory',
'Get-SnipeitAccessory',
'Remove-SnipeitAsset',
'Remove-SnipeitUser',
'Update-SnipeitAlias',
'Set-SnipeitAccessoryOwner',
'Get-SnipeitAccessoryOwner',
'Reset-SnipeitAccessoryOwner',
'Get-SnipeitActivity'
)

View file

@ -1,6 +1,6 @@
<#
.DESCRIPTION
Powershell API for SnipeIt Asset Management
Powershell API for Snipeit Asset Management
#>
$scriptRoot = $PSScriptRoot + '\Public'
@ -15,4 +15,4 @@ Get-ChildItem $scriptRoot *.ps1 | ForEach-Object {
}
#Create unprefixed aliases
Set-SnipeItAlias
Set-SnipeitAlias

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItAccessory
# Get-SnipeitAccessory
## SYNOPSIS
Gets a list of Snipe-it Accessories
@ -14,14 +14,14 @@ Gets a list of Snipe-it Accessories
### Search
```
Get-SnipeItAccessory [-search <String>] [-company_id <Int32>] [-category_id <Int32>] [-manufacturer_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>]
```
### Get by ID
```
Get-SnipeItAccessory [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitAccessory [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -31,12 +31,12 @@ Gets a list of Snipe-it Accessories
### EXAMPLE 1
```
Get-SnipeItAccessory -search Keyboard
Get-SnipeitAccessory -search Keyboard
```
### EXAMPLE 2
```
Get-SnipeItAccessory -id 1
Get-SnipeitAccessory -id 1
```
## PARAMETERS
@ -57,7 +57,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -224,7 +224,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItAccessoryOwner
# Get-SnipeitAccessoryOwner
## SYNOPSIS
Get list of checked out accessories
@ -13,7 +13,7 @@ Get list of checked out accessories
## SYNTAX
```
Get-SnipeItAccessoryOwner [-id] <Int32> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
Get-SnipeitAccessoryOwner [-id] <Int32> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
```
@ -24,13 +24,13 @@ Get list of checked out accessories
### EXAMPLE 1
```
Get-SnipeItAccessoryOwner -id 1
Get-SnipeitAccessoryOwner -id 1
```
## PARAMETERS
### -apiKey
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -60,7 +60,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItActivity
# Get-SnipeitActivity
## SYNOPSIS
Gets and search Snipe-it Activity history
@ -13,7 +13,7 @@ Gets and search Snipe-it Activity history
## SYNTAX
```
Get-SnipeItActivity [[-search] <String>] [[-target_type] <String>] [[-target_id] <Int32>]
Get-SnipeitActivity [[-search] <String>] [[-target_type] <String>] [[-target_id] <Int32>]
[[-item_type] <String>] [[-item_id] <Int32>] [[-action_type] <String>] [[-limit] <Int32>] [[-offset] <Int32>]
[-all] [-url] <String> [-apiKey] <String> [<CommonParameters>]
```
@ -25,12 +25,12 @@ Gets a list of Snipe-it activity history
### EXAMPLE 1
```
Get-SnipeItAccessory -search Keyboard
Get-SnipeitAccessory -search Keyboard
```
### EXAMPLE 2
```
Get-SnipeItAccessory -id 1
Get-SnipeitAccessory -id 1
```
## PARAMETERS
@ -67,7 +67,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -189,7 +189,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItAsset
# Get-SnipeitAsset
## SYNOPSIS
Gets a list of Snipe-it Assets or specific asset
@ -14,7 +14,7 @@ Gets a list of Snipe-it Assets or specific asset
### Search
```
Get-SnipeItAsset [-search <String>] [-order_number <String>] [-model_id <Int32>] [-category_id <Int32>]
Get-SnipeitAsset [-search <String>] [-order_number <String>] [-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>] [-offset <Int32>] [-all] -url <String> -apiKey <String> [<CommonParameters>]
@ -22,17 +22,17 @@ Get-SnipeItAsset [-search <String>] [-order_number <String>] [-model_id <Int32>]
### Get with id
```
Get-SnipeItAsset [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitAsset [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with asset tag
```
Get-SnipeItAsset [-asset_tag <String>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitAsset [-asset_tag <String>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with serial
```
Get-SnipeItAsset [-serial <String>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitAsset [-serial <String>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -42,22 +42,22 @@ Get-SnipeItAsset [-serial <String>] -url <String> -apiKey <String> [<CommonParam
### EXAMPLE 1
```
Get-SnipeItAsset -url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -url "https://assets.example.com"-token "token..."
```
### EXAMPLE 2
```
Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
```
### EXAMPLE 3
```
Get-SnipeItAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -search "myMachine"-url "https://assets.example.com"-token "token..."
```
### EXAMPLE 4
```
Get-SnipeItAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..."
Get-SnipeitAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..."
```
## PARAMETERS
@ -78,7 +78,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -269,7 +269,7 @@ Aliases:
Required: False
Position: Named
Default value: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
@ -365,7 +365,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItAssetMaintenance
# Get-SnipeitAssetMaintenance
## SYNOPSIS
Lists Snipe-it Assets Maintenances
@ -13,7 +13,7 @@ Lists Snipe-it Assets Maintenances
## SYNTAX
```
Get-SnipeItAssetMaintenance [[-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-SnipeItAssetMaintenance [[-search] <String>] [[-asset_id] <Int32>] [[-sort]
### EXAMPLE 1
```
Get-SnipeItAssetMaintenances -url "https://assets.example.com" -token "token..."
Get-SnipeitAssetMaintenances -url "https://assets.example.com" -token "token..."
```
### EXAMPLE 2
```
Get-SnipeItAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..."
Get-SnipeitAssetMaintenances -search "myMachine" -url "https://assets.example.com" -token "token..."
```
### EXAMPLE 3
```
Get-SnipeItAssetMaintenances -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItCategory
# Get-SnipeitCategory
## SYNOPSIS
Gets a list of Snipe-it Categories
@ -14,13 +14,13 @@ Gets a list of Snipe-it Categories
### Search
```
Get-SnipeItCategory [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
Get-SnipeitCategory [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
-url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItCategory [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitCategory [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,12 +30,12 @@ Get-SnipeItCategory [-id <Int32>] -url <String> -apiKey <String> [<CommonParamet
### EXAMPLE 1
```
Get-SnipeItCategory -id 1
Get-SnipeitCategory -id 1
```
### EXAMPLE 2
```
Get-SnipeItCategory -search "Laptop"
Get-SnipeitCategory -search "Laptop"
```
## PARAMETERS
@ -56,7 +56,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -148,7 +148,7 @@ Accept wildcard characters: False
```
### -url
Url of Snipeit system, can be set using Set-SnipeItInfo command
Url of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItCompany
# Get-SnipeitCompany
## SYNOPSIS
Gets a list of Snipe-it Companies
@ -14,13 +14,13 @@ Gets a list of Snipe-it Companies
### Search
```
Get-SnipeItCompany [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
Get-SnipeitCompany [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
-apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItCompany [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitCompany [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,13 +30,13 @@ Get-SnipeItCompany [-id <Int32>] -url <String> -apiKey <String> [<CommonParamete
### EXAMPLE 1
```
Get-SnipeItCompany
Get-SnipeitCompany
Gets all companies
```
### EXAMPLE 2
```
Get-SnipeItCompany -id 1
Get-SnipeitCompany -id 1
Gets specific company
```
@ -58,7 +58,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -150,7 +150,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItComponent
# Get-SnipeitComponent
## SYNOPSIS
Gets a list of Snipe-it Components
@ -14,14 +14,14 @@ Gets a list of Snipe-it Components
### Search
```
Get-SnipeItComponent [-search <String>] [-category_id <Int32>] [-company_id <Int32>] [-location_id <Int32>]
Get-SnipeitComponent [-search <String>] [-category_id <Int32>] [-company_id <Int32>] [-location_id <Int32>]
[-order <String>] [-sort <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String> -apiKey <String>
[<CommonParameters>]
```
### Get with ID
```
Get-SnipeItComponent [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitComponent [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -31,19 +31,19 @@ Get-SnipeItComponent [-id <Int32>] -url <String> -apiKey <String> [<CommonParame
### EXAMPLE 1
```
Get-SnipeItComponent
Get-SnipeitComponent
Returns all components
```
### EXAMPLE 2
```
Get-SnipeItComponent -search display
Get-SnipeitComponent -search display
Returns search results containeing string display
```
### EXAMPLE 3
```
Get-SnipeItComponent -id
Get-SnipeitComponent -id
Returns specific component
```
@ -65,7 +65,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -217,7 +217,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system,can be set using Set-SnipeItInfo command
URL of Snipeit system,can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItCustomField
# Get-SnipeitCustomField
## SYNOPSIS
Returns specific Snipe-IT custom field or a list of all custom field
@ -13,7 +13,7 @@ Returns specific Snipe-IT custom field or a list of all custom field
## SYNTAX
```
Get-SnipeItCustomField [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
Get-SnipeitCustomField [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
```
## DESCRIPTION
@ -23,13 +23,13 @@ Get-SnipeItCustomField [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<Comm
### EXAMPLE 1
```
Get-SnipeItCustomField -url "https://assets.example.com" -token "token..."
Get-SnipeitCustomField -url "https://assets.example.com" -token "token..."
```
## PARAMETERS
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItDepartment
# Get-SnipeitDepartment
## SYNOPSIS
Gets a list of Snipe-it Departments
@ -14,13 +14,13 @@ Gets a list of Snipe-it Departments
### Search
```
Get-SnipeItDepartment [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
Get-SnipeitDepartment [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[-sort <String>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItDepartment [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitDepartment [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,17 +30,17 @@ Get-SnipeItDepartment [-id <Int32>] -url <String> -apiKey <String> [<CommonParam
### EXAMPLE 1
```
Get-SnipeItDepartment -url "https://assets.example.com" -token "token..."
Get-SnipeitDepartment -url "https://assets.example.com" -token "token..."
```
### EXAMPLE 2
```
Get-SnipeItDepartment -search Department1
Get-SnipeitDepartment -search Department1
```
### EXAMPLE 3
```
Get-SnipeItDepartment -id 1
Get-SnipeitDepartment -id 1
```
## PARAMETERS
@ -61,7 +61,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -168,7 +168,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItFieldset
# Get-SnipeitFieldset
## SYNOPSIS
Returns a fieldset or list of Snipe-it Fieldsets
@ -13,7 +13,7 @@ Returns a fieldset or list of Snipe-it Fieldsets
## SYNTAX
```
Get-SnipeItFieldset [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
Get-SnipeitFieldset [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonParameters>]
```
## DESCRIPTION
@ -23,18 +23,18 @@ Get-SnipeItFieldset [[-id] <Int32>] [-url] <String> [-apiKey] <String> [<CommonP
### EXAMPLE 1
```
Get-SnipeItFieldset -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" }
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-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -64,7 +64,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItLicense
# Get-SnipeitLicense
## SYNOPSIS
Gets a list of Snipe-it Licenses
@ -14,7 +14,7 @@ Gets a list of Snipe-it Licenses
### Search
```
Get-SnipeItLicense [-search <String>] [-name <String>] [-company_id <Int32>] [-product_key <String>]
Get-SnipeitLicense [-search <String>] [-name <String>] [-company_id <Int32>] [-product_key <String>]
[-order_number <String>] [-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>
@ -23,7 +23,7 @@ Get-SnipeItLicense [-search <String>] [-name <String>] [-company_id <Int32>] [-p
### Get with ID
```
Get-SnipeItLicense [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitLicense [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -33,12 +33,12 @@ Get-SnipeItLicense [-id <Int32>] -url <String> -apiKey <String> [<CommonParamete
### EXAMPLE 1
```
Get-SnipeItLicense -search SomeLicense
Get-SnipeitLicense -search SomeLicense
```
### EXAMPLE 2
```
Get-SnipeItLicense -id 1
Get-SnipeitLicense -id 1
```
## PARAMETERS
@ -59,7 +59,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -250,7 +250,7 @@ Aliases:
Required: False
Position: Named
Default value: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
@ -331,7 +331,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItLicenseSeat
# Get-SnipeitLicenseSeat
## SYNOPSIS
Gets a list of Snipe-it Licenses Seats or specific Seat
@ -13,7 +13,7 @@ Gets a list of Snipe-it Licenses Seats or specific Seat
## SYNTAX
```
Get-SnipeItLicenseSeat [-id] <Int32> [[-seat_id] <Int32>] [[-limit] <Int32>] [[-offset] <Int32>] [-all]
Get-SnipeitLicenseSeat [-id] <Int32> [[-seat_id] <Int32>] [[-limit] <Int32>] [[-offset] <Int32>] [-all]
[-url] <String> [-apiKey] <String> [<CommonParameters>]
```
@ -24,7 +24,7 @@ Get-SnipeItLicenseSeat [-id] <Int32> [[-seat_id] <Int32>] [[-limit] <Int32>] [[-
### EXAMPLE 1
```
Get-SnipeItLicenseSeat -id 1
Get-SnipeitLicenseSeat -id 1
```
## PARAMETERS
@ -45,7 +45,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -122,7 +122,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,5 +1,5 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
@ -30,12 +30,12 @@ Get-SnipeitLocation [-id <Int32>] -url <String> -apiKey <String> [<CommonParamet
### EXAMPLE 1
```
Get-SnipeItLocation -search Location1
Get-SnipeitLocation -search Location1
```
### EXAMPLE 2
```
Get-SnipeItLocation -id 3
Get-SnipeitLocation -id 3
```
## PARAMETERS
@ -56,7 +56,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -148,7 +148,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItManufacturer
# Get-SnipeitManufacturer
## SYNOPSIS
# Gets a list of Snipe-it Manufacturers
@ -14,13 +14,13 @@ schema: 2.0.0
### Search
```
Get-SnipeItManufacturer [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
Get-SnipeitManufacturer [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
-url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItManufacturer [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitManufacturer [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,13 +30,13 @@ Get-SnipeItManufacturer [-id <Int32>] -url <String> -apiKey <String> [<CommonPar
### EXAMPLE 1
```
Get-SnipeItManufacturer -search HP
Get-SnipeitManufacturer -search HP
Search all manufacturers for string HP
```
### EXAMPLE 2
```
Get-SnipeItManufacturer -id 3
Get-SnipeitManufacturer -id 3
Returns manufacturer with id 3
```
@ -58,7 +58,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -150,7 +150,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItModel
# Get-SnipeitModel
## SYNOPSIS
Gets a list of Snipe-it Models
@ -14,13 +14,13 @@ Gets a list of Snipe-it Models
### Search
```
Get-SnipeItModel [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
Get-SnipeitModel [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
-apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItModel [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitModel [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,12 +30,12 @@ Get-SnipeItModel [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters
### EXAMPLE 1
```
Get-SnipeItModel -search "DL380"
Get-SnipeitModel -search "DL380"
```
### EXAMPLE 2
```
Get-SnipeItModel -id 1
Get-SnipeitModel -id 1
```
## PARAMETERS
@ -56,7 +56,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -148,7 +148,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItStatus
# Get-SnipeitStatus
## SYNOPSIS
Gets a list of Snipe-it Status Labels
@ -14,13 +14,13 @@ Gets a list of Snipe-it Status Labels
### Search
```
Get-SnipeItStatus [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
Get-SnipeitStatus [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
-apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItStatus [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitStatus [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,12 +30,12 @@ Get-SnipeItStatus [-id <Int32>] -url <String> -apiKey <String> [<CommonParameter
### EXAMPLE 1
```
Get-SnipeItStatus -search "Ready to Deploy"
Get-SnipeitStatus -search "Ready to Deploy"
```
### EXAMPLE 2
```
Get-SnipeItStatus -id 3
Get-SnipeitStatus -id 3
```
## PARAMETERS
@ -56,7 +56,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -148,7 +148,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItSupplier
# Get-SnipeitSupplier
## SYNOPSIS
# Gets a list of Snipe-it Suppliers
@ -14,13 +14,13 @@ schema: 2.0.0
### Search
```
Get-SnipeItSupplier [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
Get-SnipeitSupplier [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
-url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItSupplier [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitSupplier [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -30,12 +30,12 @@ Get-SnipeItSupplier [-id <Int32>] -url <String> -apiKey <String> [<CommonParamet
### EXAMPLE 1
```
Get-SnipeItSupplier -search MySupplier
Get-SnipeitSupplier -search MySupplier
```
### EXAMPLE 2
```
Get-SnipeItSupplier -id 2
Get-SnipeitSupplier -id 2
```
## PARAMETERS
@ -56,7 +56,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -148,7 +148,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Get-SnipeItUser
# Get-SnipeitUser
## SYNOPSIS
# Gets a list of Snipe-it Users
@ -14,14 +14,14 @@ schema: 2.0.0
### Search
```
Get-SnipeItUser [-search <String>] [-company_id <Int32>] [-location_id <Int32>] [-group_id <Int32>]
Get-SnipeitUser [-search <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>]
```
### Get with ID
```
Get-SnipeItUser [-id <String>] -url <String> -apiKey <String> [<CommonParameters>]
Get-SnipeitUser [-id <String>] -url <String> -apiKey <String> [<CommonParameters>]
```
## DESCRIPTION
@ -31,22 +31,22 @@ Get-SnipeItUser [-id <String>] -url <String> -apiKey <String> [<CommonParameters
### EXAMPLE 1
```
Get-SnipeItUser -search SomeSurname
Get-SnipeitUser -search SomeSurname
```
### EXAMPLE 2
```
Get-SnipeItUser -id 3
Get-SnipeitUser -id 3
```
### EXAMPLE 3
```
Get-SnipeItUser -username someuser
Get-SnipeitUser -username someuser
```
### EXAMPLE 4
```
Get-SnipeItUser -email user@somedomain.com
Get-SnipeitUser -email user@somedomain.com
```
## PARAMETERS
@ -67,7 +67,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -234,7 +234,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItAsset
# 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-SnipeItAsset [-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] <DateTime>]
[[-supplier_id] <Int32>] [[-rtd_location_id] <Int32>] [-url] <String> [-apiKey] <String>
@ -27,26 +27,26 @@ Long description
### EXAMPLE 1
```
New-SnipeItAsset -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-SnipeItAsset -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-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" }
New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" }
Using customfields when creating asset.
```
## PARAMETERS
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -257,7 +257,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItAssetMaintenance
# 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-SnipeItAssetMaintenance [-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-SnipeItAssetMaintenence -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItCategory
# New-SnipeitCategory
## SYNOPSIS
Create a new Snipe-IT Category
@ -13,7 +13,7 @@ Create a new Snipe-IT Category
## SYNTAX
```
New-SnipeItCategory [-name] <String> [-category_type] <String> [-url] <String> [-apiKey] <String>
New-SnipeitCategory [-name] <String> [-category_type] <String> [-url] <String> [-apiKey] <String>
[-use_default_eula] [-require_acceptance] [-checkin_email] [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -24,13 +24,13 @@ New-SnipeItCategory [-name] <String> [-category_type] <String> [-url] <String> [
### EXAMPLE 1
```
New-SnipeItCategory -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItComponent
# New-SnipeitComponent
## SYNOPSIS
Create a new component
@ -13,7 +13,7 @@ Create a new component
## SYNTAX
```
New-SnipeItComponent [-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>] [[-order_number] <String>] [[-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-SnipeItInfo command
User's 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItCustomField
# 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-SnipeItCustomField [-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-SnipeItCustomField -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItDepartment
# New-SnipeitDepartment
## SYNOPSIS
Creates a department
@ -13,7 +13,7 @@ Creates a department
## SYNTAX
```
New-SnipeItDepartment [-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-SnipeItDepartment -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItLicense
# New-SnipeitLicense
## SYNOPSIS
Creates a licence
@ -13,7 +13,7 @@ Creates a licence
## SYNTAX
```
New-SnipeItLicense [-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-SnipeItLicence -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItLocation
# 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-SnipeItLocation [-name] <String> [[-address] <String>] [[-address2] <String>] [[-city] <String>]
New-SnipeitLocation [-name] <String> [[-address] <String>] [[-address2] <String>] [[-city] <String>]
[[-state] <String>] [[-country] <String>] [[-zip] <String>] [[-currency] <String>] [[-parent_id] <Int32>]
[[-manager_id] <Int32>] [[-ldap_ou] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
@ -26,7 +26,7 @@ Long description
### EXAMPLE 1
```
New-SnipeItLocation -name "Room 1" -address "123 Asset Street" -parent_id 14
New-SnipeitLocation -name "Room 1" -address "123 Asset Street" -parent_id 14
```
## PARAMETERS
@ -62,7 +62,7 @@ Accept wildcard characters: False
```
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -197,7 +197,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItManufacturer
# New-SnipeitManufacturer
## SYNOPSIS
Add a new Manufacturer to Snipe-it asset system
@ -13,7 +13,7 @@ Add a new Manufacturer to Snipe-it asset system
## SYNTAX
```
New-SnipeItManufacturer [-Name] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
New-SnipeitManufacturer [-Name] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
```
@ -24,13 +24,13 @@ Long description
### EXAMPLE 1
```
New-SnipeItManufacturer -name "HP"
New-SnipeitManufacturer -name "HP"
```
## PARAMETERS
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -60,7 +60,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItModel
# 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-SnipeItModel [-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-SnipeItModel -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# New-SnipeItUser
# New-SnipeitUser
## SYNOPSIS
Creates a new user
@ -13,7 +13,7 @@ Creates a new user
## SYNTAX
```
New-SnipeItUser [-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-SnipeItuser -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
```
@ -49,7 +49,7 @@ Accept wildcard characters: False
```
### -apiKey
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -259,7 +259,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Remove-SnipeItAsset
# Remove-SnipeitAsset
## SYNOPSIS
Removes Asset from Snipe-it asset system
@ -13,7 +13,7 @@ Removes Asset from Snipe-it asset system
## SYNTAX
```
Remove-SnipeItAsset [-id] <Int32> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-SnipeitAsset [-id] <Int32> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
@ -23,13 +23,13 @@ Removes Asset from Snipe-it asset system
### EXAMPLE 1
```
Remove-SnipeItAsset -ID 44 -Verbose
Remove-SnipeitAsset -ID 44 -Verbose
```
## PARAMETERS
### -APIKey
User's API Key for Snipeit, can be set using Set-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Remove-SnipeItUser
# Remove-SnipeitUser
## SYNOPSIS
Removes User from Snipe-it asset system
@ -13,7 +13,7 @@ Removes User from Snipe-it asset system
## SYNTAX
```
Remove-SnipeItUser [-id] <Int32> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-SnipeitUser [-id] <Int32> [-URL] <String> [-APIKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
@ -23,13 +23,13 @@ Long description
### EXAMPLE 1
```
Remove-SnipeItUser -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-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Reset-SnipeItAccessoryOwner
# Reset-SnipeitAccessoryOwner
## SYNOPSIS
Checkin accessories
@ -13,7 +13,7 @@ Checkin accessories
## SYNTAX
```
Reset-SnipeItAccessoryOwner [-assigned_pivot_id] <Int32> [-url] <String> [-apiKey] <String> [-WhatIf]
Reset-SnipeitAccessoryOwner [-assigned_pivot_id] <Int32> [-url] <String> [-apiKey] <String> [-WhatIf]
[-Confirm] [<CommonParameters>]
```
@ -27,16 +27,16 @@ Checkin accessories
To get the accessories_users table for specific accessory id number
```
Get-SnipeItAccessoryOwner -id 1
Get-SnipeitAccessoryOwner -id 1
Thenselect assigned_pivot_id for userid you like check in
Get-SnipeItAccessoryOwner -assigned_pivot_id xxx
Get-SnipeitAccessoryOwner -assigned_pivot_id xxx
## PARAMETERS
### -apiKey
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -52,7 +52,7 @@ Accept wildcard characters: False
### -assigned_pivot_id
This is the assigned_pivot_id of the accessory+user relationships in the accessories_users table
Use Get-SnipeItAccessoryOwner to find out nooded value
Use Get-SnipeitAccessoryOwner to find out nooded value
```yaml
Type: Int32
@ -67,7 +67,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Set-SnipeItAccessory
# Set-SnipeitAccessory
## SYNOPSIS
Updates accessory on Snipe-It system
@ -13,7 +13,7 @@ Updates accessory on Snipe-It system
## SYNTAX
```
Set-SnipeItAccessory [-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-SnipeItAccessory -id 1 -qty 3
Set-SnipeitAccessory -id 1 -qty 3
```
## PARAMETERS
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfoeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfoeItInfoeItInfo command
```yaml
Type: String
@ -86,7 +86,7 @@ Aliases:
Required: True
Position: 1
Default value: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
@ -122,7 +122,7 @@ Accept wildcard characters: False
```
### -name
ID number of Accessory on Snipe-It system
ID number of Accessory or array of IDs on Snipe-It system
```yaml
Type: String
@ -212,7 +212,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Set-SnipeItAccessoryOwner
# Set-SnipeitAccessoryOwner
## SYNOPSIS
Checkout accessory
@ -13,7 +13,7 @@ Checkout accessory
## SYNTAX
```
Set-SnipeItAccessoryOwner [-id] <Int32[]> [-assigned_to] <Int32> [[-note] <String>] [-url] <String>
Set-SnipeitAccessoryOwner [-id] <Int32[]> [-assigned_to] <Int32> [[-note] <String>] [-url] <String>
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -24,13 +24,13 @@ Checkout accessory to user
### EXAMPLE 1
```
Set-SnipeItAccessoryOwner -id 1 -assigned_id 1 -note "testing check out to user"
Set-SnipeitAccessoryOwner -id 1 -assigned_id 1 -note "testing check out to user"
```
## PARAMETERS
### -apiKey
User's API Key for Snipeit, can be set using Set-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -60,7 +60,7 @@ Accept wildcard characters: False
```
### -id
Unique ID For accessory to checkout
Unique ID For accessory or array of IDs to checkout
```yaml
Type: Int32[]
@ -69,7 +69,7 @@ Aliases:
Required: True
Position: 1
Default value: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
@ -90,7 +90,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Set-SnipeItAsset
# 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-SnipeItAsset [-id] <Int32[]> [[-name] <String>] [[-status_id] <Int32>] [[-model_id] <Int32>]
Set-SnipeitAsset [-id] <Int32[]> [[-name] <String>] [[-status_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>]
[[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>]
@ -28,18 +28,23 @@ Long description
### EXAMPLE 1
```
Set-SnipeItAsset -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-SnipeItAsset -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" }
```
### EXAMPLE 3
```
Get-SnipeitAsset -serial 12345678 | Set-SnipeitAsset -notes 'Just updated'
```
## PARAMETERS
### -apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command
Users API Key for Snipeit, can be set using Set-SnipeitInfoeItInfo command
```yaml
Type: String
@ -115,7 +120,7 @@ Accept wildcard characters: False
```
### -id
ID of the Asset
ID of the Asset or array of IDs
```yaml
Type: Int32[]
@ -124,7 +129,7 @@ Aliases:
Required: True
Position: 1
Default value: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
@ -311,7 +316,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Set-SnipeItAssetOwner
# Set-SnipeitAssetOwner
## SYNOPSIS
Checkout asset
@ -13,7 +13,7 @@ Checkout asset
## SYNTAX
```
Set-SnipeItAssetOwner [-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
```
Set-SnipeItAssetOwner -id 1 -assigned_id 1 -checkout_to_type user -note "testing check out to user"
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-SnipeItInfo command
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
```yaml
Type: String
@ -106,7 +106,7 @@ Accept wildcard characters: False
```
### -id
Unique ID For asset to checkout
Unique IDs For assets to checkout
```yaml
Type: Int32[]
@ -115,7 +115,7 @@ Aliases:
Required: True
Position: 1
Default value: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
@ -154,7 +154,7 @@ Accept wildcard characters: False
```
### -url
URL of Snipeit system, can be set using Set-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Set-SnipeItComponent
# Set-SnipeitComponent
## SYNOPSIS
Updates component
@ -13,7 +13,7 @@ Updates component
## SYNTAX
```
Set-SnipeItComponent [-id] <Int32> [-qty] <Int32> [[-name] <String>] [[-company_id] <Int32>]
Set-SnipeitComponent [-id] <Int32> [-qty] <Int32> [[-name] <String>] [[-company_id] <Int32>]
[[-location_id] <Int32>] [[-order_number] <String>] [[-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-SnipeItInfo command
User's 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: String

View file

@ -1,11 +1,11 @@
---
external help file: SnipeItPS-help.xml
external help file: SnipeitPS-help.xml
Module Name: SnipeitPS
online version:
schema: 2.0.0
---
# Set-SnipeItInfo
# Set-SnipeitInfo
## SYNOPSIS
Sets authetication information
@ -13,7 +13,7 @@ Sets authetication information
## SYNTAX
```
Set-SnipeItInfo [[-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-SnipeItInfo -url $url -apiKey -Verbose
Set-SnipeitInfo -url $url -apiKey -Verbose
```
## PARAMETERS
### -apiKey
User's API Key for Snipeit, can be set using Set-SnipeItInfo 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-SnipeItInfo command
URL of Snipeit system, can be set using Set-SnipeitInfo command
```yaml
Type: Uri

Some files were not shown because too many files have changed in this diff Show more