mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Update New-SnipeitAudit.ps1
- Modified nextAudit param to [datetime] - Added parameter description at beginning of doc - Added code to format date to yyyy-MM-dd for SnipeIT
This commit is contained in:
parent
68ae039013
commit
51cb9f88f5
1 changed files with 5 additions and 2 deletions
|
|
@ -8,6 +8,9 @@ Long description
|
||||||
.PARAMETER Tag
|
.PARAMETER Tag
|
||||||
The asset tag of the asset you wish to audit
|
The asset tag of the asset you wish to audit
|
||||||
|
|
||||||
|
.PARAMETER purchase_date
|
||||||
|
Due date for the asset's next audit
|
||||||
|
|
||||||
.PARAMETER Location_id
|
.PARAMETER Location_id
|
||||||
ID of the location you want to associate with the audit
|
ID of the location you want to associate with the audit
|
||||||
|
|
||||||
|
|
@ -29,7 +32,7 @@ function New-SnipeitAudit() {
|
||||||
[int]$location_id,
|
[int]$location_id,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[string]$nextAudit,
|
[datetime]$nextAudit,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[string]$url,
|
[string]$url,
|
||||||
|
|
@ -50,7 +53,7 @@ function New-SnipeitAudit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($PSBoundParameters.ContainsKey('nextAudit')) {
|
if ($PSBoundParameters.ContainsKey('nextAudit')) {
|
||||||
$Values += @{"next_audit_date" = $nextAudit}
|
$Values += @{"next_audit_date" = ($nextAudit).ToString("yyyy-MM-dd")}
|
||||||
}
|
}
|
||||||
|
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue