未分類

PowerShell - 定義されているタイプアクセラレーターを取得する

Windows PowerShell で使用できるタイプアクセラレーターを取得する方法を説明します。

タイプアクセラレーターを取得

$type = "System.Management.Automation.TypeAccelerators"
([type]::GetType($type))::Get.GetEnumerator() | sort Key

Windows PowerShell 2.0 で定義されているタイプアクセラレーター

Key Value
--- -----
adsi System.DirectoryServices.DirectoryEntry
adsisearcher System.DirectoryServices.DirectorySearcher
array System.Array
bool System.Boolean
byte System.Byte
char System.Char
decimal System.Decimal
double System.Double
float System.Single
hashtable System.Collections.Hashtable
int System.Int32
ipaddress System.Net.IPAddress
long System.Int64
powershell System.Management.Automation.PowerShell
pscustomobject System.Management.Automation.PSObject
psmoduleinfo System.Management.Automation.PSModuleInfo
psobject System.Management.Automation.PSObject
psprimitivedictionary System.Management.Automation.PSPrimitiveDictionary
ref System.Management.Automation.PSReference
regex System.Text.RegularExpressions.Regex
runspace System.Management.Automation.Runspaces.Runspace
runspacefactory System.Management.Automation.Runspaces.RunspaceFactory
scriptblock System.Management.Automation.ScriptBlock
single System.Single
string System.String
switch System.Management.Automation.SwitchParameter
type System.Type
wmi System.Management.ManagementObject
wmiclass System.Management.ManagementClass
wmisearcher System.Management.ManagementObjectSearcher
xml System.Xml.XmlDocument

-未分類