< Back
Protect-PodeValue
Post
NAME Protect-PodeValue
SYNOPSIS
Protects a value, by returning a default value is the main one is null/empty.
SYNTAX
Protect-PodeValue [[-Value] <Object>] [[-Default] <Object>] [<CommonParameters>]
DESCRIPTION
Protects a value, by returning a default value is the main one is null/empty.
PARAMETERS
-Value <Object>
The main value to use.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Default <Object>
A default value to return should the main value be null/empty.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Object
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Name = Protect-PodeValue -Value $Name -Default 'Rick'
RELATED LINKS
SYNOPSIS
Protects a value, by returning a default value is the main one is null/empty.
SYNTAX
Protect-PodeValue [[-Value] <Object>] [[-Default] <Object>] [<CommonParameters>]
DESCRIPTION
Protects a value, by returning a default value is the main one is null/empty.
PARAMETERS
-Value <Object>
The main value to use.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Default <Object>
A default value to return should the main value be null/empty.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Object
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Name = Protect-PodeValue -Value $Name -Default 'Rick'
RELATED LINKS