類型: String[] 別名: PN Position: Named 預設值: None 必要: False 接受管線輸入: False 接受萬用字元: False-TemplateContent指定表達式或儲存為變數的表達式,描述此 Cmdlet 指派字串的屬性。 樣本欄位規格的語法如下:{[optional-typecast]<name>:<example-value>}。 展開資料表 類型: String[] 別名: TC...
string[] Split(char[] separator, int count) string[] Split(char[] separator, System.StringSplitOptions options) string[] Split(char[] separator, int count, System.StringSplitOptions options) string[] Split(string[] separator, System.StringSplitOptions options) string[] Split(string[] separator, int...
Test-MrParameterValidation : Cannot process argument transformation on parameter 'ComputerName'. Cannot convert value to type System.String. At line:1 char:42 + Test-MrParameterValidation -ComputerName Server01, Server02 + ~~~ + CategoryInfo : InvalidData: (:) [Test-MrParameterValidation] , Par...
ConvertTo-SecureString[-String] <String> [-AsPlainText] [-Force] [<CommonParameters>] PowerShell ConvertTo-SecureString[-String] <String> [-Key <Byte[]>] [<CommonParameters>] 说明 ConvertTo-SecureStringcmdlet 将加密的标准字符串转换为安全字符串。 它还可以将纯文本转换为安全字符串。 它与ConvertF...
This TechNet Wiki is based on the forum post: Convert the Bytes Array to String using PowerShellIssue/RequirementCan't return string for msExchMailboxGUIDExplore AD Properties$user = Get-ADUser -Identity 12345 -Properties *$user.msExchMailboxGuid.GetType().FullName $user...
String To convert the string ($b = "123") data type to an integer, we can use[int]as shown below. $b=$b-as[int]$b.GetType().Name In the code above, we start with the variable$b. The current value and data type of$bare unknown to us at this point, but we want to ensure...
Example 4: Convert a string to a hash table This example converts a regular double-quoted string (not a here-string) into a hash table and saves it in the$Avariable. PowerShell $A=ConvertFrom-StringData-StringData"Top = Red `n Bottom = Blue"$AName Value --- --- Bottom Blue Top...
ConvertTo-Html[-InputObject <PSObject>] [[-Property] <Object[]>] [[-Body] <String[]>] [[-Head] <String[]>] [[-Title] <String>] [-As <String>] [-CssUri <Uri>] [-PostContent <String[]>] [-PreContent <String[]>] [-Meta <Hashtable>] [-Charset <String>] [-Transitional]...
ConvertTo-SecureString [[-SecureKey] <SecureString>] [-String] <string> [<CommonParameters>] 说明 ConvertTo-SecureString cmdlet 将加密的标准字符串转换为安全字符串。它还可以将纯文本转换为安全字符串。此 Cmdlet 与 ConvertFrom-SecureString 和 Read-Host 一起使用。该 cmdlet 创建的安全字符串可以与需要类...
ConvertFrom-SecureStringcmdlet 可将安全字符串 (System.Security.SecureString) 转换为加密的标准字符串 (System.String)。和安全字符串不同,加密的标准字符串可保存在文件中以供以后使用。 加密的标准字符串可转换回它的安全字符串格式,方法是使用ConvertTo-SecureStringcmdlet。