PowerShell stuff


My need to remember posh stuff

Google translate
$text = Get-Clipboard
$TargetLanguage = "en"
$Uri = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=$($TargetLanguage)&dt=t&q=$($text.Replace('#',''))"
$Response = Invoke-RestMethod -Uri $Uri -Method Get
Save credentials in user context
#//This will only work in the "creating user" context

#//Saving credentials
$cred = get-credentials
$cred | Export-Clixml cred.xml

#//Importing credentials
$cred = Import-Clixml cred.xml