{"id":10031,"date":"2006-07-12T12:12:00","date_gmt":"2006-07-12T12:12:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2006\/07\/12\/type-shortcuts\/"},"modified":"2019-02-18T13:21:33","modified_gmt":"2019-02-18T20:21:33","slug":"type-shortcuts","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/type-shortcuts\/","title":{"rendered":"Type Shortcuts"},"content":{"rendered":"<p class=\"MsoNormal\"><span>PSMDTAG:FAQ: What is a TYPE SHORTCUT?<br \/>PSMDTAG:FAQ: What are the TYPE SHORTCUTS?<\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span>Type shortcuts are a Windows PowerShell feature that allows you to reduce the amount of typing you have to do when specifying a type.&nbsp; <\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span>For example, the following 2 statements produce the same result:<\/span><\/p>\n<p class=\"MsoNormal\"><span>[System.Text.RegularExpressions.Regex]&#8221;^c.*&#8221;<\/span><\/p>\n<p class=\"MsoNormal\"><span>[Regex]&#8221;^c.*&#8221;<\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span>Jim Truher produced the following list of type shortcuts available in V1.0 (NOTE: The WMI ones will be available in RC2 as noted in: <a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2006\/06\/26\/647038.aspx\">http:\/\/blogs.msdn.com\/powershell\/archive\/2006\/06\/26\/647038.aspx<\/a>&nbsp;)<\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Courier New\" size=\"1\"><\/font><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span><font face=\"Courier New\" size=\"1\"><\/font><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span><font face=\"Courier New\" size=\"1\">[int]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(int) <br \/>[int[]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(int[]) <br \/>[long]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(long) <br \/>[long[]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(long[]) <br \/>[string]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(string) <br \/>[string[]]&nbsp;&nbsp;&nbsp;&nbsp;typeof(string[]) <br \/>[char]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(char) <br \/>[char[]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(char[]) <br \/>[bool]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(bool) <br \/>[bool[]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(bool[]) <br \/>[byte]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(byte) <br \/>[double]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(double) <br \/>[decimal]&nbsp;&nbsp;&nbsp;&nbsp; typeof(decimal) <br \/>[float]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(float)<br \/>[single]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(float)<br \/>[regex]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Text.RegularExpressions.Regex)<br \/>[array]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Array)<br \/>[xml]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Xml.XmlDocument)<br \/>[scriptblock] typeof(System.Management.Automation.ScriptBlock)<br \/>[switch]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Management.Automation.SwitchParameter)<br \/>[hashtable]&nbsp;&nbsp; typeof(System.Collections.Hashtable)<br \/>[type]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Type)<br \/>[ref]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Management.Automation.PSReference)<br \/>[psobject]&nbsp;&nbsp;&nbsp; typeof(System.Management.Automation.PSObject)<br \/>[wmi]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeof(System.Management.ManagementObject)<br \/>[wmisearcher] typeof(System.Management.ManagementObjectSearcher)<br \/>[wmiclass]&nbsp;&nbsp;&nbsp; typeof(System.Management.ManagementClass)<\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span><\/span><span>Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/Aspen Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p><span><\/p>\n<p class=\"MsoNormal\"><span>PSMTAG:DOTNET: Language shortcuts for type specifications<\/p>\n<p class=\"MsoNormal\"><span>PSMTAG:LANGUAGE: Language shortcuts for type specifications<\/span><\/p>\n<p><\/span><\/span><span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PSMDTAG:FAQ: What is a TYPE SHORTCUT?PSMDTAG:FAQ: What are the TYPE SHORTCUTS? &nbsp; Type shortcuts are a Windows PowerShell feature that allows you to reduce the amount of typing you have to do when specifying a type.&nbsp; &nbsp; For example, the following 2 statements produce the same result: [System.Text.RegularExpressions.Regex]&#8221;^c.*&#8221; [Regex]&#8221;^c.*&#8221; &nbsp; Jim Truher produced the following [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[14,10,33,35],"class_list":["post-10031","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-dotnet","tag-faq","tag-language","tag-type-shortcuts"],"acf":[],"blog_post_summary":"<p>PSMDTAG:FAQ: What is a TYPE SHORTCUT?PSMDTAG:FAQ: What are the TYPE SHORTCUTS? &nbsp; Type shortcuts are a Windows PowerShell feature that allows you to reduce the amount of typing you have to do when specifying a type.&nbsp; &nbsp; For example, the following 2 statements produce the same result: [System.Text.RegularExpressions.Regex]&#8221;^c.*&#8221; [Regex]&#8221;^c.*&#8221; &nbsp; Jim Truher produced the following [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/10031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=10031"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/10031\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=10031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=10031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=10031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}