![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | SecureString : Using -key If I do this on my PC $s = Read-Host -assecurestring $s = ConvertFrom-SecureString $s -key(1..16) $s > test.cfg and then to this on another PC $s = convertto-securestring (get-content test.cfg) - key (1..16) The first 7 characters appears as ??????? followed by the rest of the string. The same statement on the PC used to create the test.cfg file appears correct. I used the -encoding option with out-file but have the same results. Could anyone shed some light on this ? don't know whats going wrong. Thanks |
My System Specs![]() |
| | #2 (permalink) |
| | RE: SecureString : Using -key dm_14, I tested this on Win XP SP2 and the hash secured string is returned, not ???????. Which platform are you using for the 2 systems you mentioned? -- ............... All new, all fresh .............. http://www.leedesmond.com/weblog/ "dm_14" wrote: > If I do this on my PC > $s = Read-Host -assecurestring > $s = ConvertFrom-SecureString $s -key(1..16) > $s > test.cfg > > and then to this on another PC > $s = convertto-securestring (get-content test.cfg) - key (1..16) > > > The first 7 characters appears as ??????? followed by the rest of the string. > The same statement on the PC used to create the test.cfg file appears correct. > > I used the -encoding option with out-file but have the same results. > > Could anyone shed some light on this ? don't know whats going wrong. Thanks |
My System Specs![]() |
| | #3 (permalink) |
| | RE: SecureString : Using -key Demond, The encrypted string was created on a WinXP pc and the decryption occurs on Win2003 server. If I perform both the encryption and decryption on the same WinXP pc I get the correct secured string the same as you. I tried several times between the server and the WinXP PC and each time the first seven characters appear as ???????, all text past it appears correctly. I got round it by creating the encrypted string on the Win2003 server and that worked fine on the server. But I still don't know why it shouldn't work between the PC and server. Any thoughts ? "Desmond Lee" wrote: > dm_14, > > I tested this on Win XP SP2 and the hash secured string is returned, not > ???????. Which platform are you using for the 2 systems you mentioned? > > -- > .............. All new, all fresh .............. > http://www.leedesmond.com/weblog/ > > > "dm_14" wrote: > > > If I do this on my PC > > $s = Read-Host -assecurestring > > $s = ConvertFrom-SecureString $s -key(1..16) > > $s > test.cfg > > > > and then to this on another PC > > $s = convertto-securestring (get-content test.cfg) - key (1..16) > > > > > > The first 7 characters appears as ??????? followed by the rest of the string. > > The same statement on the PC used to create the test.cfg file appears correct. > > > > I used the -encoding option with out-file but have the same results. > > > > Could anyone shed some light on this ? don't know whats going wrong. Thanks |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| SecureString in Batch | PowerShell | |||
| Using SecureString objects | PowerShell | |||
| HowTo: Use ConvertTo-SecureString and ConvertFrom-SecureString | PowerShell | |||