Powershell ConvertTo-SecureString ObjectNotFound

升级到PowerShell 3.0后,现有的脚本停止工作的错误

ConvertTo-SecureString : The term 'ConvertTo-SecureString' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ConvertTo-SecureString + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (ConvertTo-SecureString:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException 

我发现在PS 3.0上支持 ConvertTo-SecureString。 我需要包含它吗?

 Import-modulee 'Microsoft.PowerShell.Security' 

解决了这个问题。 我不知道为什么这个模块默认没有加载。