[quote quote=177640]Ah, apologies. This is where I regret not testing the code / having a Redis Cache to test against.
It seems likely that there will be a property on that object that we need to specify, instead of using the default ToString method. Can you, excluding any potentially sensitive information, show the output of either:
<textarea class="ace_text-input" style="opacity: 0; height: 17.6px; width: 6.59775px; left: 44px; top: 0px;" spellcheck="false" wrap="off"></textarea>
$CacheKey | Get-Member
Edit: A quick Google shows that it should have two properties – PrimaryKey and SecondaryKey.
If you adjust the code above to `ConvertTo-SecureString $CacheKey.PrimaryKey […]`, that should solve it.
Genius! Thank you!! works perfectly! thanks again!