SnipeitPS/README.md

52 lines
2 KiB
Markdown
Raw Normal View History

2017-11-19 11:43:49 +00:00
[![GitHub release](https://img.shields.io/github/release/snazy2000/SnipeitPS.svg)](https://github.com/snazy2000/snipeitps/releases/latest) [![Build status](https://ci.appveyor.com/api/projects/status/dvuw4ggx543nx3h7/branch/master?svg=true)](https://ci.appveyor.com/project/snazy2000/snipeitps/branch/master) [![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/snipeitps.svg)](https://www.powershellgallery.com/packages/snipeitps) ![License](https://img.shields.io/badge/license-MIT-blue.svg)
2017-11-19 11:37:31 +00:00
---
2019-04-27 09:51:49 +01:00
## Want to say thanks?
[![paypal](https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XP29MAD7P3WDN&source=url)
2017-11-19 11:37:31 +00:00
## Instructions
### Installation
2017-11-19 11:43:49 +00:00
Install SnipeitPS from the PowerShell Gallery `Install-Module` requires PowerShellGet (included in PS v5, or download for v3/v4 via the gallery link)
2017-11-19 11:37:31 +00:00
```powershell
# One time only install: (requires an admin PowerShell window)
Install-Module SnipeitPS
# Check for updates occasionally:
Update-Module SnipeitPS
2021-09-03 15:54:36 +03:00
# import module to session:
2017-11-19 11:37:31 +00:00
Import-Module SnipeitPS
2021-09-03 15:54:36 +03:00
# 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'
2017-11-19 11:37:31 +00:00
```
### Usage
```powershell
# Review the help at any time!
2021-06-14 00:21:12 +03:00
Get-Help about_SnipeitPS
2017-11-19 11:37:31 +00:00
Get-Command -Module SnipeitPS
2021-06-08 22:04:25 +03:00
Get-Help Get-SnipeitAsset -Full # or any other command
2017-11-19 11:37:31 +00:00
```
2021-05-18 05:26:38 +03:00
### Reporting bugs and issues
Please use -Verbose switch with command you have problem with.
2021-05-18 05:30:28 +03:00
Then create ticket here with all -Verbose output