mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 01:42:29 +00:00
51 lines
2 KiB
Markdown
51 lines
2 KiB
Markdown
[](https://github.com/snazy2000/snipeitps/releases/latest) [](https://ci.appveyor.com/project/snazy2000/snipeitps/branch/master) [](https://www.powershellgallery.com/packages/snipeitps) 
|
|
|
|
---
|
|
|
|
## Want to say thanks?
|
|
|
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XP29MAD7P3WDN&source=url)
|
|
|
|
## 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)
|
|
|
|
```powershell
|
|
# 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
|
|
|
|
```powershell
|
|
# 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
|