mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
AllowEmptyString() is only needed on mandatory parameters
This commit is contained in:
parent
9562ab3d46
commit
1e31256487
8 changed files with 11 additions and 20 deletions
|
|
@ -84,7 +84,7 @@ function Set-SnipeItAccessory() {
|
|||
[ValidateRange(1, [int]::MaxValue)]
|
||||
[int]$manufacturer_id,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$order_number,
|
||||
|
||||
[float]$purchase_cost,
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ function Set-SnipeItAsset()
|
|||
[parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
|
||||
[int[]]$id,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$name,
|
||||
|
||||
[int]$status_id,
|
||||
|
|
@ -101,7 +101,7 @@ function Set-SnipeItAsset()
|
|||
|
||||
[string]$serial,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$order_number,
|
||||
|
||||
[int]$warranty_months,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ function Set-SnipeItComponent()
|
|||
|
||||
[int]$location_id,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$order_number,
|
||||
|
||||
[datetime]$purchase_date,
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ function Set-SnipeItLicense() {
|
|||
|
||||
[string]$notes,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$order_number,
|
||||
|
||||
[float]$purchase_cost,
|
||||
|
|
|
|||
|
|
@ -68,30 +68,22 @@ function Set-SnipeitLocation() {
|
|||
[ValidateLength(3, 255)]
|
||||
[string]$name,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$address,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$address2,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$state,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$country,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$zip,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$city,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$currency,
|
||||
|
||||
[int]$manager_id,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$ldap_ou,
|
||||
|
||||
[int]$parent_id,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ function Set-SnipeItModel() {
|
|||
[ValidateLength(1, 255)]
|
||||
[string]$name,
|
||||
|
||||
[AllowEmptyString()]
|
||||
[string]$model_number,
|
||||
|
||||
[int]$category_id,
|
||||
|
|
|
|||
|
|
@ -80,13 +80,13 @@ function Set-SnipeItUser() {
|
|||
|
||||
[string]$userName,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$jobtitle,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$email,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$phone,
|
||||
|
||||
[int]$company_id,
|
||||
|
|
@ -97,12 +97,12 @@ function Set-SnipeItUser() {
|
|||
|
||||
[int]$manager_id,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$employee_num,
|
||||
|
||||
[bool]$activated,
|
||||
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string]$notes,
|
||||
|
||||
[parameter(mandatory = $true)]
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function Update-SnipeItAlias()
|
|||
param(
|
||||
[Parameter(Mandatory = $true,
|
||||
ValueFromPipeline = $true)]
|
||||
[AllowEmptyString()]
|
||||
|
||||
[string[]]
|
||||
$String
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue