PowerShellで使用することが出来る変数のデータ型の一覧です。
データ型の一覧
データ型の一覧です。
PowerShellでは、独自にデータ型が定義されておらず、.NET Frameworkのデータ型を使用します。
| 型 | 名前 | 説明 |
|---|---|---|
| [array] | [System.Array] | 配列 |
| [bool] | [System.Boolean] | true・false |
| [byte] | [System.Byte] | 0 ~ 255 |
| [char] | [System.Char] | 0 ~ 65535 |
| [datetime] | [System.DateTime] | 0001/01/01 0:00:00 ~ 9999/12/31 23:59:59 |
| [decimal] | [System.Decimal] | -79228162514264337593543950335 ~ 79228162514264337593543950335 |
| [double] | [System.Double] | -1.79769313486232E+308 ~ 1.79769313486232E+308 |
| [guid] | [System.Guid] | グローバル識別子 |
| [hashtable] | [System.Collections.Hashtable] | 連想配列 |
| [int16] | [System.Int16] | -32768 ~ 32767 |
| [int32] [int] | [System.Int32] | -2147483648 ~ 2147483647 |
| [int64] [long] | [System.Int64] | -9223372036854775808 ~ 9223372036854775807 |
| [nullable] | [System.Nullable] | null許容型 |
| [psobject] | [System.Management.Automation.PSObject] | – |
| [regex] | [System.Text.RegularExpressions.Regex] | – |
| [sbyte] | [System.SByte] | -128 ~ 127 |
| [scriptblock] | [System.Management.Automation.ScriptBlock] | – |
| [single] [float] | [System.Single] | -3.402823E+38 ~ 3.402823E+38 |
| [string] | [System.String] | 文字列 |
| [switch] | [System.Management.Automation.SwitchParameter] | – |
| [timespan] | [System.TimeSpan] | -10675199.02:48:05.4775808 ~ 10675199.02:48:05.4775807 |
| [type] | [System.Type] | |
| [uint16] | [System.UInt16] | 0 ~ 65535 |
| [uint32] | [System.UInt32] | 0 ~ 4294967295 |
| [uint64] | [System.UInt64] | 0 ~ 18446744073709551615 |
| [xml] | [System.Xml.XmlDocument] | – |
型の確認方法
変数のデータ型を確認する方法は、以下の記事でまとめています。
リンク




コメント