Skip to content

Commit c5e02c8

Browse files
authored
Merge pull request #109 from snazy2000/develop
Fixed missed aliases on parameter rename. Updated docs.
2 parents 7b20f86 + 8fbd929 commit c5e02c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+6435
-1056
lines changed

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/),
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [1.0] - 2017-11-18
8+
# [v1.1.x] - 2021-05-18
9+
10+
## Pull request rollup release. Lots of new features including:
11+
12+
### New features
13+
- Powershell 7 compatibility. So you can use SnipeItPS on macos or linux .
14+
- Get every asset, model, licence with snipeit id by using -id parameter
15+
- Get assets also by -asset_tag -or serialnumber
16+
- Get functions also return all results from snipe when using -all parameter (by @PetriAsi)
17+
18+
### New functions
19+
- Reset-AssetOwner by @lunchboxrts
20+
- Remove-Asset by @sheppyh
21+
- Added Remove-AssetMaintenance by @sheppyh
22+
- Remove-User @gvoynov
23+
24+
### Fixes
25+
- Fixed version number on powershell gallery
26+
- Fixed Set-AssetOwner when checking asset out to an other asset.
27+
28+
## [v1.0] - 2017-11-18

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ Get-Help about_SnipeitPS
3232
Get-Command -Module SnipeitPS
3333
Get-Help Get-Asset -Full # or any other command
3434
```
35+
### Reporting bugs and issues
36+
Please use -Verbose switch with command you have problem with.
37+
Then create ticket here with all -Verbose output

SnipeitPS/Public/Get-Accessory.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<#
22
.SYNOPSIS
3-
# Gets a list of Snipe-it Accessories
3+
Gets a list of Snipe-it Accessories
4+
5+
.DESCRIPTION
6+
Gets a list of Snipe-it Accessories
47
58
.PARAMETER search
69
A text string to search the Accessory data
@@ -12,7 +15,7 @@ A id of specific Accessory
1215
Specify the number of results you wish to return. Defaults to 50. Defines batch size for -all
1316
1417
.PARAMETER offset
15-
Offset to use
18+
Result offset to use
1619
1720
.PARAMETER all
1821
A return all results, works with -offset and other parameters
@@ -24,12 +27,13 @@ URL of Snipeit system, can be set using Set-Info command
2427
Users API Key for Snipeit, can be set using Set-Info command
2528
2629
.EXAMPLE
27-
Get-Accessory -url "https://assets.example.com" -token "token..."
30+
Get-Accessory -search Keyboard
2831
2932
.EXAMPLE
30-
Get-Accessory -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "HP" }
33+
Get-Accessory -id 1
3134
3235
#>
36+
3337
function Get-Accessory() {
3438
Param(
3539
[string]$search,

SnipeitPS/Public/Get-Asset.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<#
22
.SYNOPSIS
3-
Gets a list of Snipe-it Assets
3+
Gets a list of Snipe-it Assets or specific asset
44
55
.PARAMETER search
66
A text string to search the assets data
77
88
.PARAMETER id
9-
A text string to search the assets data
9+
ID number of excact snipeit asset
1010
1111
.PARAMETER asset_tag
12-
Specify exact asset tag to query
12+
Exact asset tag to query
1313
1414
.PARAMETER asset_serial
15-
Specify exact asset serial to query
15+
Exact asset serialnumber to query
1616
1717
.PARAMETER order_number
1818
Optionally restrict asset results to this order number
@@ -71,6 +71,7 @@ Get-Asset -search "myMachine"-url "https://assets.example.com"-token "token..."
7171
.EXAMPLE
7272
Get-Asset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..."
7373
#>
74+
7475
function Get-Asset() {
7576
Param(
7677
[string]$search,

SnipeitPS/Public/Get-AssetMaintenance.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<#
22
.SYNOPSIS
3-
Gets a list of Snipe-it Assets
3+
Lists Snipe-it Assets Maintenances
44
55
.PARAMETER asset_id
6-
6+
Asset ID of the asset you'd like to return maintenances for
77
88
.PARAMETER search
9-
A text string to search the assets data
9+
Search string
1010
1111
.PARAMETER sort
1212
Specify the column name you wish to sort by

SnipeitPS/Public/Get-Category.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
# Gets a list of Snipe-it Categories
3+
Gets a list of Snipe-it Categories
44
55
.PARAMETER search
66
A text string to search the Categories data
@@ -18,16 +18,16 @@ Offset to use
1818
A return all results, works with -offset and other parameters
1919
2020
.PARAMETER url
21-
URL of Snipeit system, can be set using Set-Info command
21+
Url of Snipeit system, can be set using Set-Info command
2222
2323
.PARAMETER apiKey
2424
Users API Key for Snipeit, can be set using Set-Info command
2525
2626
.EXAMPLE
27-
Get-Category -url "https://assets.example.com" -token "token..."
27+
Get-Category -id 1
2828
2929
.EXAMPLE
30-
Get-Category -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Laptop" }
30+
Get-Category -search "Laptop"
3131
3232
#>
3333

SnipeitPS/Public/Get-Company.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
# Gets a list of Snipe-it Companies
3+
Gets a list of Snipe-it Companies
44
55
.PARAMETER search
66
A text string to search the Companies data
@@ -16,18 +16,19 @@ Offset to use
1616
1717
.PARAMETER all
1818
A return all results, works with -offset and other parameters
19-
2019
.PARAMETER url
2120
URL of Snipeit system, can be set using Set-Info command
2221
2322
.PARAMETER apiKey
2423
Users API Key for Snipeit, can be set using Set-Info command
2524
2625
.EXAMPLE
27-
Get-Company -url "https://assets.example.com" -token "token..."
26+
Get-Company
27+
Gets all companies
2828
2929
.EXAMPLE
30-
Get-Company -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Company1" }
30+
Get-Company -id 1
31+
Gets specific company
3132
3233
#>
3334

SnipeitPS/Public/Get-Component.ps1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
# Gets a list of Snipe-it Components
3+
Gets a list of Snipe-it Components
44
55
.PARAMETER search
66
A text string to search the Components data
@@ -18,16 +18,22 @@ Offset to use
1818
A return all results, works with -offset and other parameters
1919
2020
.PARAMETER url
21-
URL of Snipeit system, can be set using Set-Info command
21+
URL of Snipeit system,can be set using Set-Info command
2222
2323
.PARAMETER apiKey
2424
Users API Key for Snipeit, can be set using Set-Info command
2525
2626
.EXAMPLE
27-
Get-Component -url "https://assets.example.com" -token "token..."
27+
Get-Component
28+
Returns all components
2829
2930
.EXAMPLE
30-
Get-Component -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Memory" }
31+
Get-Component -search display
32+
Returns search results containeing string display
33+
34+
.EXAMPLE
35+
Get-Component -id
36+
Returns specific component
3137
3238
#>
3339

SnipeitPS/Public/Get-CustomField.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<#
2-
.SYNOPSIS
3-
# Returns a list of all Snipe-IT custom fields
2+
.SYNOPSIS
3+
Returns a list of all Snipe-IT custom fields
44
5-
.PARAMETER url
6-
URL of Snipeit system, can be set using Set-Info command
5+
.PARAMETER url
6+
URL of Snipeit system, can be set using Set-Info command
77
8-
.PARAMETER apiKey
9-
Users API Key for Snipeit, can be set using Set-Info command
8+
.PARAMETER apiKey
9+
Users API Key for Snipeit, can be set using Set-Info command
1010
11-
.EXAMPLE
12-
Get-Field -url "https://assets.example.com" -token "token..."
11+
.EXAMPLE
12+
Get-Field -url "https://assets.example.com" -token "token..."
1313
1414
#>
1515

SnipeitPS/Public/Get-Department.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
.SYNOPSIS
3-
# Gets a list of Snipe-it Departments
3+
Gets a list of Snipe-it Departments
44
55
.PARAMETER search
66
A text string to search the Departments data
@@ -27,7 +27,10 @@ Users API Key for Snipeit, can be set using Set-Info command
2727
Get-Department -url "https://assets.example.com" -token "token..."
2828
2929
.EXAMPLE
30-
Get-Department -url "https://assets.example.com" -token "token..." | Where-Object {$_.name -eq "Department1" }
30+
Get-Department -search Department1
31+
32+
.EXAMPLE
33+
Get-Department -id 1
3134
3235
#>
3336

0 commit comments

Comments
 (0)