I know this is not the most secure way to store credentials but it works and is simple to manage.
I use this when I need creds stored for accessing web based resources.
To use it run the following:
#To set Credentials
Set-MyCredential -File c:\temp\thecreds.dat
#To get Credentials
$creds = Get-MyCredential -User domain\user -File c:\temp\thecreds.dat
$Credential = Get-Credential
$credential.Password | ConvertFrom-SecureString | Set-Content $File
function Get-MyCredential($User, $File)
$password = Get-Content $File | ConvertTo-SecureString
$credential = New-Object System.Management.Automation.PsCredential($user,$password)