 <p>Ok, on your second question, exporting and importing passwords, the encryption is done per user (and I'm pretty sure per machine), so you can't export it, and then have another account import it, but for just straight saving an encrypted password you can use these functions:</p> <pre><code>Function Out-EncryptedPasswordFile{ [cmdletbinding()] Param( [Parameter(Mandatory = $true)] [string]$Password, [Parameter(Mandatory = $true)] [ValidateScript({If(Test-Path (Split-Path $_)){$true}else{Throw "Unable to create file, directory '$(Split-Path $_)\' does not exist."} })][String]$Path ) ConvertTo-SecureString -AsPlainText $Password -Force | ConvertFrom-SecureString | Set-Content $Path -Encoding Unicode } #Usage Example #Out-EncryptedPasswordFile TestP@ssw0rd c:\temp\password.txt Function Import-EncryptedPasswordFile{ [cmdletbinding()] Param( [Parameter(Mandatory = $true)] [ValidateScript({Test-Path $_})][string]$Path ) $SSPassword = Get-Content $Path | ConvertTo-SecureString $Ptr = [System.Runtime.InteropServices.Marshal]::SecureStringToCoTaskMemUnicode($SSPassword) [System.Runtime.InteropServices.Marshal]::PtrToStringUni($Ptr) [System.Runtime.InteropServices.Marshal]::ZeroFreeCoTaskMemUnicode($Ptr) } #Usage Example #Import-EncryptedPasswordFile C:\temp\password.txt </code></pre>