I log in to windows 2008R2 as user A and I execute the below powershell script
################################################################
$credential = Get-Credential
$credential.Password | ConvertFrom-SecureString | Set-Content e:\ow.txt
################################################################
This generates encrypted password in e:\ow.txt. This password encrypted string i can use any powershell program using below line.
$password = Get-Content e:\ow.txt | ConvertTo-SecureString -AsPlainText -Force
Question: This secure string only works when i log in as user A. If I log in asuser B it wouldn't work. Is there any mechanism where this secure string should work with any user ?
Thanks in advance.