SnipeitPS/docs/Set-SnipeitCustomField.md

259 lines
4.7 KiB
Markdown
Raw Normal View History

2021-06-14 00:19:47 +03:00
---
external help file: SnipeitPS-help.xml
2021-08-23 18:50:13 +03:00
Module Name: snipeitps
2021-06-14 00:19:47 +03:00
online version:
schema: 2.0.0
---
# Set-SnipeitCustomField
## SYNOPSIS
Add a new Custom Field to Snipe-it asset system
## SYNTAX
```
Set-SnipeitCustomField [-id] <Int32[]> [[-name] <String>] [[-help_text] <String>] [-element] <String>
[[-format] <String>] [[-field_values] <String>] [[-field_encrypted] <Boolean>] [[-show_in_email] <Boolean>]
2021-08-23 18:50:13 +03:00
[[-custom_format] <String>] [[-RequestType] <String>] [[-url] <String>] [[-apiKey] <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
2021-06-14 00:19:47 +03:00
```
## DESCRIPTION
Add a new Custom Field to Snipe-it asset system
## EXAMPLES
### EXAMPLE 1
```
New-SnipeitCustomField -Name "AntivirusInstalled" -Format "BOOLEAN" -HelpText "Is AntiVirus installed on Asset"
```
## PARAMETERS
### -apiKey
2021-08-23 18:50:13 +03:00
Deprecated parameter, please use Connect-SnipeitPS instead.
Users API Key for Snipeit.
2021-06-14 00:19:47 +03:00
```yaml
Type: String
Parameter Sets: (All)
Aliases:
2021-08-23 18:50:13 +03:00
Required: False
2021-07-14 11:16:55 +03:00
Position: 12
2021-06-14 00:19:47 +03:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -custom_format
In the case of format 'CUSTOM REGEX', this should be validation regex this field
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -element
Form field type that should be displayed.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -field_encrypted
Whether the field should be encrypted.
(This can cause issues if you change it after the field was created.)
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -field_values
In the case of list boxes, etc, this should be a list of the options available
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -format
How the field should be validated
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -help_text
Any additional text you wish to display under the new form field to make it clearer what the gauges should be.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -id
{{ Fill id Description }}
```yaml
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -name
The field's name, which is also the form label
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-07-14 11:16:55 +03:00
### -RequestType
Http request type to send Snipe IT system.
Defaults to Put you could use Patch if needed.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: Put
Accept pipeline input: False
Accept wildcard characters: False
```
2021-06-14 00:19:47 +03:00
### -show_in_email
Whether or not to show the custom field in email notifications
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -url
2021-08-23 18:50:13 +03:00
Deprecated parameter, please use Connect-SnipeitPS instead.
URL of Snipeit system.
2021-06-14 00:19:47 +03:00
```yaml
Type: String
Parameter Sets: (All)
Aliases:
2021-08-23 18:50:13 +03:00
Required: False
2021-07-14 11:16:55 +03:00
Position: 11
2021-06-14 00:19:47 +03:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS