27 lines
666 B
PowerShell
27 lines
666 B
PowerShell
function Get-SecretServerConnection {
|
|
<#
|
|
.SYNOPSIS
|
|
Exports a [SecretServerConnection] which can be used from Powershell's commandline. Largely for testing purposes.
|
|
|
|
.PARAMETER Site
|
|
The uri for the Secret Server to connect to.
|
|
|
|
.PARAMETER userName
|
|
Secret Server username.
|
|
|
|
.PARAMETER password
|
|
Secret Server password.
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Site,
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$UserName,
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Password
|
|
)
|
|
|
|
return [SecretServerConnection]::new([string]$Site, [string]$UserName, [string]$Password);
|
|
}
|