mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Merge pull request #257 from PetriAsi/patch-1
@RussellLeVasseur : Add Next Audit Date to New-SnipeItAudit.ps1
This commit is contained in:
commit
72c6ccbd38
1 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,9 @@ Long description
|
|||
.PARAMETER Tag
|
||||
The asset tag of the asset you wish to audit
|
||||
|
||||
.PARAMETER next_audit_date
|
||||
Due date for the asset's next audit
|
||||
|
||||
.PARAMETER Location_id
|
||||
ID of the location you want to associate with the audit
|
||||
|
||||
|
|
@ -28,6 +31,9 @@ function New-SnipeitAudit() {
|
|||
|
||||
[int]$location_id,
|
||||
|
||||
[parameter(mandatory = $false)]
|
||||
[datetime]$next_audit_date,
|
||||
|
||||
[parameter(mandatory = $false)]
|
||||
[string]$url,
|
||||
|
||||
|
|
@ -46,6 +52,10 @@ function New-SnipeitAudit() {
|
|||
$Values += @{"asset_tag" = $tag}
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('next_audit_date')) {
|
||||
$Values += @{"next_audit_date" = ($next_audit_date).ToString("yyyy-MM-dd")}
|
||||
}
|
||||
|
||||
$Parameters = @{
|
||||
Api = "/api/v1/hardware/audit"
|
||||
Method = 'Post'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue