I want to assign message in credential declaration on very start of cmdlet
for example
param{
[validationNullorEmpty]
[param(mandatory=true, helpmessage="Enter Domain spec cred")]
$credential=[pscredential]::Empty
}
instead of helpmessage I want to add below Message
if ($credential -ne $null){$credential=Get-credential -Message "Add domain cred"}
because when I define function have no $credential then default window it show me the message "enter the credential" that I don't want I want my message "Add domain cred"
Actually this message will appear after first default window, so instead of get-credential default window I want to custom my window with my message, how to do that, instead of help message can I declare -Message in [param(mandatory=true,
-Message="Enter Domain spec cred")] like this