mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-15 18:55:47 +00:00
Update New-SnipeitAsset.ps1
added asset_eol_date
This commit is contained in:
parent
29c23e92ea
commit
ecdf2a42c2
1 changed files with 7 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ function New-SnipeitAsset() {
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[datetime]$purchase_date,
|
[datetime]$purchase_date,
|
||||||
|
|
||||||
|
[parameter(mandatory = $false)]
|
||||||
|
[datetime]$asset_eol_date,
|
||||||
|
|
||||||
[parameter(mandatory = $false)]
|
[parameter(mandatory = $false)]
|
||||||
[int]$supplier_id,
|
[int]$supplier_id,
|
||||||
|
|
||||||
|
|
@ -157,6 +160,10 @@ function New-SnipeitAsset() {
|
||||||
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
|
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($values['asset_eol_date']) {
|
||||||
|
$values['asset_eol_date'] = $values['asset_eol_date'].ToString("yyyy-MM-dd")
|
||||||
|
}
|
||||||
|
|
||||||
if ($customfields) {
|
if ($customfields) {
|
||||||
$Values += $customfields
|
$Values += $customfields
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue