Author: loxschpen | Posted on: 6/7/2008 10:55:31 AM | Views : 393

Hi Everyone,

   I am revamping my web services to create new mailboxes in Exchange 2007 with PowerShell (using teh exchange snap-in of course). Everything is going hunky doory except for the plain fact that no matter what I do I cannot seem to pass a secure string at all! I am pretty sure I am doing this corectly. Below if my code that I am using to convert and pass the SecureString to PowerShell:

  string pass = "password";
SecureString secString = new SecureString();
char[] pwChars = pass.ToCharArray();
foreach (char c in pwChars)
secString.AppendChar(c);

secString.MakeReadOnly(); //closes the string so that nothing else can be passed into it.

re ...

Go to the complete details ...