/SnipeitPS

Powershell API Wrapper for Snipe-it

Primary LanguagePowerShellMIT LicenseMIT

GitHub release Build status PowerShell Gallery License


Want to say thanks?

paypal

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