Powershell变量的类型

Powershell 默认支持的.NET类型如下:

[pscustomobject]
[System.Object]
[System.ValueType]
[void]
[bool]
[enum]
[byte]
[sbyte]
[int16]
[uint16]
[char]
[int]
[int32]
[uint32]
[float]
[single]
[long]
[int64]
[uint64]
[double]
[DateTime]
[decimal]
[guid]
[array]
[string]
[hashtable]
[random]
[regex]
[XML]
[WMI]
[WMICLASS]
[ADSI]

[object],[valuetype],[void],[bool],[byte],[int],[long],[single],[double],[datetime],[decimal],[guid],[array],[string],[hashtable],[random],[regex],[PSObject],[XML],[WMI],[WMICLASS],[ADSI],[Diagnostics.Process],[ServiceProcess.ServiceController],[IO.FileInfo],[IO.DirectoryInfo] | FT Name,IsClass,IsValueType,UnderlyingSystemType,BaseType -auto
原文地址:https://www.cnblogs.com/IvanChen/p/4488519.html