Copy or clone a hashtable?

I thought the following line of code would make the job. However, despite at first glance it works fine, it has some unexpected consequences: both objects are now bound and any changes made to one of them is also made to the other one. To convince you, try the following script which does followings: Create […]

[Solved] Input string was not in a correct format

When you want to convert a string to a secure string with ConvertTo-SecureString, you may get the following error message Reason This happens when you try to convert a regular string to a secure string. “Convert To Secure String” string only means “to protect in memory”. However, the standard input for the ConvertTo-SecureString cmdlet is […]

Credential prompt: command line or dialog box?

Technically there is no security difference between the two methods. It’s only a matter of preferences and the behavior depends of a single registry value. Be prompted at the command line Set the ConsolePrompting value to True Be prompted from a dialog box Set the ConsolePrompting value to False or anything else than True. Or […]