Author Tim Cartwright
Saves a user credential to the Windows Credential Manager that can be retried later, and passed in to functions that require credentials.
Saves a user credential to the Windows Credential Manager that can be retried later, and passed in to functions that require credentials. Should be run to store the credentials, but not saved into a script. That way you can keep from storing passwords into your scripts.
Removal of credentials can be done by accessing the Credential Manager UI from windows.
Set-DBUserCredential
[-ApplicationName] <String>
[-UserName] <String>
[-Password] <String>
[<CommonParameters>]
-ApplicationName <String>
The application name the credentials will be saved under.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-UserName <String>
The user name for the credential.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Password <String>
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
# DO NOT STORE THIS LINE IN YOUR SCRIPTS
Set-DBUserCredential -ApplicationName "TimsTest" -UserName "tcartwright" -Password "my sql password here"
# now these creds can be retrieved using Get-DBUserCredential in scripts