Test D365LabelIdIsValid - FH-Inway/d365fo.tools GitHub Wiki
Checks if a string is a valid 'Label Id' format
Test-D365LabelIdIsValid [-LabelId] <String> [<CommonParameters>]
This function will validate if a string is a valid 'Label Id' format.
Test-D365LabelIdIsValid -LabelId "ABC123"
This will test the if the LabelId is valid. It will use the "ABC123" as the LabelId parameter.
The expected result is $true
Test-D365LabelIdIsValid -LabelId "@ABC123"
This will test the if the LabelId is valid. It will use the "@ABC123" as the LabelId parameter.
The expected result is $true
Test-D365LabelIdIsValid -LabelId "@ABC123_1"
This will test the if the LabelId is valid. It will use the "@ABC123_1" as the LabelId parameter.
The expected result is $false
Test-D365LabelIdIsValid -LabelId "ABC.123" #False
This will test the if the LabelId is valid. It will use the "ABC.123" as the LabelId parameter.
The expected result is $false
The LabelId string thay you want to validate
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Alex Kwitny (@AlexOnDAX)
The intent of this function is to be used with other methods to create valid labels via scripting.