mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-12 17:32:30 +00:00
Powershell API Wrapper for Snipe-it
Support for setting group on user creation and api request throttling Now there's API request throttling support in SnipeitPS . You can specify throttlelimit and period with Connect-SnipeitPS . After that SnipeitPS know when to pause. You can start limit 120 and period 60000 (ms) from hosted snipeit installation. For the fine tune there's throttlemode parameter that can be set to Burst, Constant or Adaptive. |
||
|---|---|---|
| .github | ||
| .vscode | ||
| docs | ||
| SnipeitPS | ||
| Tests | ||
| .gitlab-ci.yml | ||
| _config.yml | ||
| appveyor.yml | ||
| build.ps1 | ||
| CHANGELOG.md | ||
| LICENSE | ||
| PSScriptAnalyzerSettings.psd1 | ||
| README.md | ||
| SnipeitPS.build.ps1 | ||
Want to say thanks?
Instructions
Installation
Install SnipeitPS from the PowerShell Gallery Install-Module requires PowerShellGet (included in PS v5, or download for v3/v4 via the gallery link)
# One time only install: (requires an admin PowerShell window)
Install-Module SnipeitPS
# Check for updates occasionally:
Update-Module SnipeitPS
# import module to session:
Import-Module SnipeitPS
# Set connection
Connect-SnipeitPS -URL 'https://asset.example.com' -apiKey 'tokenKey'
# Or set connection with safely saved credentials, first save credentials
$SnipeCred =Get-Credential -message "Use url as username and apikey as password"
$SnipeCred | Export-CliXml snipecred.xml
# ..then use your saved credentials like
Connect-SnipeitPS -siteCred (Import-CliXml snipecred.xml)
# OR use -secureApiKey that allow pass apiKey as SecureString
# if you are usin Microsoft.PowerShell.SecretManagement or like
Connect-SnipeitPS -URL 'https://asset.example.com' -secureApiKey 'tokenKey'
Usage
# Review the help at any time!
Get-Help about_SnipeitPS
Get-Command -Module SnipeitPS
Get-Help Get-SnipeitAsset -Full # or any other command
Reporting bugs and issues
Please use -Verbose switch with command you have problem with. Then create ticket here with all -Verbose output
