Skip to content

Commit 6ef20bd

Browse files
authored
Merge pull request #149 from PetriAsi/update/readme
updated docs, adding about_snipeit
2 parents d6a8289 + 843f10b commit 6ef20bd

File tree

8 files changed

+78
-40
lines changed

8 files changed

+78
-40
lines changed

SnipeitPS/Public/Get-SnipeitManufacturer.ps1

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
11
<#
2-
.SYNOPSIS
3-
# Gets a list of Snipe-it Manufacturers
2+
.SYNOPSIS
3+
# Gets a list of Snipe-it Manufacturers
44
5-
.PARAMETER search
6-
A text string to search the Manufactures data
5+
.PARAMETER search
6+
A text string to search the Manufactures data
77
8-
.PARAMETER id
9-
A id of specific Manufactuter
8+
.PARAMETER id
9+
A id of specific Manufactuter
1010
11-
.PARAMETER limit
12-
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
11+
.PARAMETER limit
12+
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
1313
14-
.PARAMETER offset
15-
Offset to use
14+
.PARAMETER offset
15+
Offset to use
1616
17-
.PARAMETER all
18-
A return all results, works with -offset and other parameters
17+
.PARAMETER all
18+
A return all results, works with -offset and other parameters
1919
20-
.PARAMETER url
21-
URL of Snipeit system, can be set using Set-SnipeitInfo command
20+
.PARAMETER url
21+
URL of Snipeit system, can be set using Set-SnipeitInfo command
2222
23-
.PARAMETER apiKey
24-
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
23+
.PARAMETER apiKey
24+
Users API Key for Snipeit, can be set using Set-SnipeitInfo command
2525
26-
.EXAMPLE
27-
Get-SnipeitManufacturer -search HP
28-
Search all manufacturers for string HP
26+
.EXAMPLE
27+
Get-SnipeitManufacturer -search HP
28+
Search all manufacturers for string HP
2929
30-
.EXAMPLE
31-
Get-SnipeitManufacturer -id 3
32-
Returns manufacturer with id 3
30+
.EXAMPLE
31+
Get-SnipeitManufacturer -id 3
32+
Returns manufacturer with id 3
3333
3434
#>
35-
3635
function Get-SnipeitManufacturer()
3736
{
3837
Param(

SnipeitPS/Public/Get-SnipeitSupplier.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Get-SnipeitSupplier -search MySupplier
3030
Get-SnipeitSupplier -id 2
3131
3232
#>
33-
3433
function Get-SnipeitSupplier()
3534
{
3635
Param(

SnipeitPS/Public/Set-SnipeitUser.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
.PARAMETER username
1818
Username for user
1919
20-
.PARAMETER active
20+
.PARAMETER activated
2121
Can user log in to snipe-it?
2222
2323
.PARAMETER notes

SnipeitPS/Public/Update-SnipeitAlias.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ Input string
1010
1111
.EXAMPLE
1212
Get-Content [your-script.ps1] | Update-SnipeitAlias | Out-File [new-script-name.ps1]
13+
1314
Replaces old command from file "your-script.ps1" and creates new script "new-script-name.ps1"
1415
After testing new file you can replace old file with new.
1516
1617
#>
17-
18-
1918
function Update-SnipeitAlias()
2019
{
2120
[CmdletBinding(

docs/Set-SnipeitUser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Updates user with id 3
3434
## PARAMETERS
3535

3636
### -activated
37-
{{ Fill activated Description }}
37+
Can user log in to snipe-it?
3838

3939
```yaml
4040
Type: Boolean

docs/SnipeitPS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,5 @@ Updates Model on Snipe-it asset system
135135
Creates a new user
136136

137137
### [Update-SnipeitAlias](Update-SnipeitAlias.md)
138-
{{ Fill in the Synopsis }}
138+
Replaces old SnipeitPS commands with new ones
139139

docs/Update-SnipeitAlias.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Update-SnipeitAlias
99

1010
## SYNOPSIS
11-
{{ Fill in the Synopsis }}
11+
Replaces old SnipeitPS commands with new ones
1212

1313
## SYNTAX
1414

@@ -17,29 +17,30 @@ Update-SnipeitAlias [-String] <String[]> [-WhatIf] [-Confirm] [<CommonParameters
1717
```
1818

1919
## DESCRIPTION
20-
{{ Fill in the Description }}
20+
Replaces old SnipeitPS commands with new ones
2121

2222
## EXAMPLES
2323

24-
### Example 1
25-
```powershell
26-
PS C:\> {{ Add example code here }}
24+
### EXAMPLE 1
25+
```
26+
Get-Content [your-script.ps1] | Update-SnipeitAlias | Out-File [new-script-name.ps1]
2727
```
2828

29-
{{ Add example description here }}
29+
Replaces old command from file "your-script.ps1" and creates new script "new-script-name.ps1"
30+
After testing new file you can replace old file with new.
3031

3132
## PARAMETERS
3233

3334
### -String
34-
{{ Fill String Description }}
35+
Input string
3536

3637
```yaml
3738
Type: String[]
3839
Parameter Sets: (All)
3940
Aliases:
4041

4142
Required: True
42-
Position: 0
43+
Position: 1
4344
Default value: None
4445
Accept pipeline input: True (ByValue)
4546
Accept wildcard characters: False
@@ -81,11 +82,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
8182
8283
## INPUTS
8384
84-
### System.String[]
85-
8685
## OUTPUTS
8786
88-
### System.Object
8987
## NOTES
9088
9189
## RELATED LINKS

docs/about_SnipeitPS.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# About SnipeitPS
2+
## about_SnipeitPS
3+
4+
# SHORT DESCRIPTION
5+
Powershell API Wrapper for Snipe-it.
6+
7+
# LONG DESCRIPTION
8+
Collection of tools that makes interacting with Snipe-it api more pleasant.
9+
10+
# EXAMPLES
11+
Prepare connection Snipe-It with:
12+
13+
Set-SnipeitInfo -url https://your.site -apikey YourVeryLongApiKey....
14+
15+
To search assets use:
16+
17+
Get-SnipeitAsset -search needle
18+
19+
Piping get and new commands results to set commands is supported. Followirg will
20+
set notes for every asset that have model_id 123.
21+
22+
Get-SnipeitAsset -model_id 123 -all | Set-SnipeitAsset
23+
24+
You can get specific items with -id prameter like
25+
26+
Get-SnipeitModel -id 123
27+
28+
# NOTE
29+
Most of commands are using same parameters as in Snipe It api,
30+
but it's always good idea check syntax with Get-Help
31+
32+
# TROUBLESHOOTING NOTE
33+
Check your api key and certificate on server first.
34+
35+
# SEE ALSO
36+
37+
Report any issues to:
38+
[GitHub project page](https://github.com/snazy2000/SnipeitPS/issues)
39+
40+
# KEYWORDS
41+
42+
- Snipe-It
43+
- asset management

0 commit comments

Comments
 (0)