Helper/Get-Credentials.ps1
function Get-Credentials { Param ( [Parameter(Position=0, Mandatory=$true)] [String] $User, [Parameter(Position=1, Mandatory=$true)] [String] $Password ) Return (New-Object System.Management.Automation.PSCredential -argumentList $User, (ConvertTo-SecureString -String $Password -AsPlainText -Force)) } Export-ModuleMember -Function Get-Credentials |