File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ Long description
88. PARAMETER Tag
99The asset tag of the asset you wish to audit
1010
11+ . PARAMETER next_audit_date
12+ Due date for the asset's next audit
13+
1114. PARAMETER Location_id
1215ID of the location you want to associate with the audit
1316
@@ -28,6 +31,9 @@ function New-SnipeitAudit() {
2831
2932 [int ]$location_id ,
3033
34+ [parameter (mandatory = $false )]
35+ [datetime ]$next_audit_date ,
36+
3137 [parameter (mandatory = $false )]
3238 [string ]$url ,
3339
@@ -45,6 +51,10 @@ function New-SnipeitAudit() {
4551 if ($PSBoundParameters.ContainsKey (' tag' )) {
4652 $Values += @ {" asset_tag" = $tag }
4753 }
54+
55+ if ($PSBoundParameters.ContainsKey (' next_audit_date' )) {
56+ $Values += @ {" next_audit_date" = ($next_audit_date ).ToString(" yyyy-MM-dd" )}
57+ }
4858
4959 $Parameters = @ {
5060 Api = " /api/v1/hardware/audit"
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ Add a new Audit to Snipe-it asset system
1313## SYNTAX
1414
1515```
16- New-SnipeitAudit [-tag] <String> [[-location_id] <Int32>] [[-url ] <String >] [[-apiKey ] <String>] [-WhatIf ]
17- [-Confirm] [<CommonParameters>]
16+ New-SnipeitAudit [-tag] <String> [[-location_id] <Int32>] [[-next_audit_date ] <DateTime >] [[-url ] <String>]
17+ [[-apiKey] <String>] [-WhatIf] [ -Confirm] [<CommonParameters>]
1818```
1919
2020## DESCRIPTION
@@ -38,7 +38,7 @@ Parameter Sets: (All)
3838Aliases :
3939
4040Required : False
41- Position : 4
41+ Position : 5
4242Default value : None
4343Accept pipeline input : False
4444Accept wildcard characters : False
@@ -59,6 +59,21 @@ Accept pipeline input: False
5959Accept wildcard characters : False
6060` ` `
6161
62+ ### -next_audit_date
63+ Due date for the asset's next audit
64+
65+ ` ` ` yaml
66+ Type : DateTime
67+ Parameter Sets : (All)
68+ Aliases :
69+
70+ Required : False
71+ Position : 3
72+ Default value : None
73+ Accept pipeline input : False
74+ Accept wildcard characters : False
75+ ` ` `
76+
6277### -tag
6378The asset tag of the asset you wish to audit
6479
@@ -83,7 +98,7 @@ Parameter Sets: (All)
8398Aliases :
8499
85100Required : False
86- Position : 3
101+ Position : 4
87102Default value : None
88103Accept pipeline input : False
89104Accept wildcard characters : False
You can’t perform that action at this time.
0 commit comments