{"id":5777,"date":"2017-11-13T09:02:32","date_gmt":"2017-11-13T14:02:32","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=5777"},"modified":"2017-11-13T09:02:32","modified_gmt":"2017-11-13T14:02:32","slug":"a-powershell-module-for-your-type-extensions","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/","title":{"rendered":"A PowerShell Module for your Type Extensions"},"content":{"rendered":"<p>If you've been following this blog recently, you've read about my fun with PowerShell type extensions. This technique lets you make PowerShell give you the information you want without a lot of work on your part. Well, there is some work but you only have to do it once. To make it even easier, I have been working on a module to simplify this even further. The module is still in beta so I'm hoping some of you will kick it around before I publish it to the PowerShell Gallery.<\/p>\n<p><!--more--><\/p>\n<p>The module, PSTypeExtensionTools, is available on Github at <a title=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\" href=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\">https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools<\/a>. Download the latest beta release zip file and extract it to a working directory.\u00a0 Unless you put it in one of the pre-defined module directories, import the module: <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=141553\" target=\"_blank\" rel=\"noopener\">Import-Module<\/a> c:\\work\\pstypeextensiontools.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png\" alt=\"image\" width=\"1028\" height=\"221\" border=\"0\" \/><\/a><\/p>\n<p>The command to create new type extensions is <a href=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\/blob\/master\/docs\/Add-PSTypeExtension.md\" target=\"_blank\" rel=\"noopener\">Add-PSTypeExtension<\/a>. You specify the type name, the member type, a name and a value. Underneath the hood this command is running <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113421\" target=\"_blank\" rel=\"noopener\">Update-TypeData<\/a> but I wanted to simplify the process a bit and take advantage of some pipeling processes. For example, you may not know off the top of your head the type name of the object you want to enhance, or it is a long type name and you prefer not to type it. <a href=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\/blob\/master\/docs\/Get-PSType.md\" target=\"_blank\" rel=\"noopener\">Get-PSType<\/a> will return the type name.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-13.png\" alt=\"image\" width=\"745\" height=\"197\" border=\"0\" \/><\/a><\/p>\n<p>I did this so I (meaning you) could run a command like this to add a new type extension.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">123 | Get-PSType | Add-PSTypeExtension -MemberType ScriptProperty -MemberName SquareRoot -Value { [math]::Sqrt($this)}\r\n<\/pre>\n<p>You can create any property type except CodeProperty and CodeMethod. These are bit more complicated and move, in my opinion, outside the realm of scripting. If you need to define these types of members, you don't need this module. Of course, once you know the type name you can create as many extensions as you'd like.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">Add-PSTypeExtension -TypeName system.int32 -MemberType ScriptProperty -MemberName Squared -value { $this*$this}\r\nAdd-PSTypeExtension -TypeName system.int32 -MemberType ScriptProperty -MemberName Cubed -value { [math]::Pow($this,3)}\r\nAdd-PSTypeExtension -TypeName system.int32 -MemberType ScriptProperty -MemberName Value -value { $this}\r\nAdd-PSTypeExtension -TypeName system.int32 -MemberType ScriptMethod -MemberName GetPercent -value {Param([int32]$Total,[int32]$Round=2) [math]::Round(($this\/$total)*100,$round)}\r\n<\/pre>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-14.png\" alt=\"image\" width=\"641\" height=\"218\" border=\"0\" \/><\/a><\/p>\n<p>Want to know what has been defined for a given type? Use <a href=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\/blob\/master\/docs\/Get-PSTypeExtension.md\" target=\"_blank\" rel=\"noopener\">Get-PSTypeExtension.<\/a> The default is to prompt you for a member name, or use the \u2013All parameter.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-15.png\" alt=\"image\" width=\"1028\" height=\"410\" border=\"0\" \/><\/a><\/p>\n<p>I'm thinking I need to modify the behavior so that showing all members is the default behavior. Now for the fun part. In order for these extensions to persist you would need to re-define them in your PowerShell profile. But perhaps you don't remember how you defined them. Or you want an easier way. You can use <a href=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\/blob\/master\/docs\/Export-PSTypeExtension.md\" target=\"_blank\" rel=\"noopener\">Export-PSTypeExtension<\/a> and export the desired members to either a json or xml file.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">Get-PSTypeExtension system.int32 -all | Export-PSTypeExtension -TypeName system.int32 -Path c:\\work\\int32-types.json\r\n<\/pre>\n<p>Do this for as many different types as you'd like.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-16.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-16.png\" alt=\"image\" width=\"1028\" height=\"188\" border=\"0\" \/><\/a><\/p>\n<p>You should check types first and only export members you have defined.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/SNAGHTML28d84173.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"SNAGHTML28d84173\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/SNAGHTML28d84173_thumb.png\" alt=\"SNAGHTML28d84173\" width=\"1028\" height=\"367\" border=\"0\" \/><\/a><\/p>\n<p>There's no reason to export anything else that is defined automatically. The export command will use with <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=217032\" target=\"_blank\" rel=\"noopener\">ConvertTo-Json<\/a> or <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113297\" target=\"_blank\" rel=\"noopener\">Export-Clixml<\/a> depending on the file extension. In your profile all you need to do is import the type extensions.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">Import-PSTypeExtension -Path C:\\work\\int32-types.json\r\n<\/pre>\n<p>Easy and it keeps my profile script simple. I've created a <a href=\"https:\/\/github.com\/jdhitsolutions\/PSTypeExtensionTools\/tree\/master\/samples\" target=\"_blank\" rel=\"noopener\">Samples<\/a> folder in the GitHub repo if you want to download and try. The samples are not part of the beta zip file but that will probably change with the next release.<\/p>\n<p>I hope a few of you will give this a try and let me know what you think. Use the Issues section to report any problems, comments or suggestions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been following this blog recently, you&#8217;ve read about my fun with PowerShell type extensions. This technique lets you make PowerShell give you the information you want without a lot of work on your part. Well, there is some work but you only have to do it once. To make it even easier, I&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Fresh Monday Blog: A #PowerShell Module for your Type Extensions","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,8],"tags":[534,540,256,283],"class_list":["post-5777","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-powershell","tag-scripting","tag-type-extensions","tag-typedata"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A PowerShell Module for your Type Extensions &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A PowerShell Module for your Type Extensions &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"If you&#039;ve been following this blog recently, you&#039;ve read about my fun with PowerShell type extensions. This technique lets you make PowerShell give you the information you want without a lot of work on your part. Well, there is some work but you only have to do it once. To make it even easier, I...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-13T14:02:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"A PowerShell Module for your Type Extensions\",\"datePublished\":\"2017-11-13T14:02:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/\"},\"wordCount\":545,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-12.png\",\"keywords\":[\"PowerShell\",\"Scripting\",\"type extensions\",\"TypeData\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/\",\"name\":\"A PowerShell Module for your Type Extensions &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-12.png\",\"datePublished\":\"2017-11-13T14:02:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-12.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-12.png\",\"width\":1028,\"height\":221},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5777\\\/a-powershell-module-for-your-type-extensions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A PowerShell Module for your Type Extensions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A PowerShell Module for your Type Extensions &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/","og_locale":"en_US","og_type":"article","og_title":"A PowerShell Module for your Type Extensions &#8226; The Lonely Administrator","og_description":"If you've been following this blog recently, you've read about my fun with PowerShell type extensions. This technique lets you make PowerShell give you the information you want without a lot of work on your part. Well, there is some work but you only have to do it once. To make it even easier, I...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/","og_site_name":"The Lonely Administrator","article_published_time":"2017-11-13T14:02:32+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"A PowerShell Module for your Type Extensions","datePublished":"2017-11-13T14:02:32+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/"},"wordCount":545,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png","keywords":["PowerShell","Scripting","type extensions","TypeData"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/","name":"A PowerShell Module for your Type Extensions &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png","datePublished":"2017-11-13T14:02:32+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-12.png","width":1028,"height":221},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5777\/a-powershell-module-for-your-type-extensions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"A PowerShell Module for your Type Extensions"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":5833,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5833\/new-powershell-projects-published\/","url_meta":{"origin":5777,"position":0},"title":"New PowerShell Projects Published","author":"Jeffery Hicks","date":"December 18, 2017","format":false,"excerpt":"Last week I published a few of the recent PowerShell modules I've been working on to the PowerShell Gallery. These projects had been in a beta phase while I worked out some last minute features. I was also waiting to see if there were any issues reported by you that\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-6.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-6.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-6.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":8215,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8215\/powershell-property-sets-to-the-rescue\/","url_meta":{"origin":5777,"position":1},"title":"PowerShell Property Sets to the Rescue","author":"Jeffery Hicks","date":"March 11, 2021","format":false,"excerpt":"if you are like me and spend most of your day at a PowerShell prompt, anything that simplifies that process is worth the time to learn or set up. Even though I am a decent typist, I am more than happy to find ways to type less at a PowerShell\u2026","rel":"","context":"In &quot;GitHub&quot;","block_context":{"text":"GitHub","link":"https:\/\/jdhitsolutions.com\/blog\/category\/github\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/03\/file-typeextensions2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/03\/file-typeextensions2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/03\/file-typeextensions2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/03\/file-typeextensions2.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2125,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/2125\/powershell-ise-addon-modulemenu\/","url_meta":{"origin":5777,"position":2},"title":"PowerShell ISE AddOn ModuleMenu","author":"Jeffery Hicks","date":"February 24, 2012","format":false,"excerpt":"Recently I did an online presentation on ISE Addons. As I was preparing for the talk one thing led to another, as they usually do when I'm working in PowerShell, and before I knew it I had a new add-on for the PowerShell ISE. This addon creates a menu for\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/02\/modulemenu-300x136.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4536,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4536\/my-uptime-powershell-module-published-to-github\/","url_meta":{"origin":5777,"position":3},"title":"My Uptime PowerShell Module Published to GitHub","author":"Jeffery Hicks","date":"September 29, 2015","format":false,"excerpt":"Earlier this year I wrote a PowerShell module to get uptime information. The module was part of a series I wrote for Petri.com. As part of my ongoing project to move some of my more interesting, and hopefully useful, tools to GitHub, I revised the module. The new version makes\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5850,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5850\/extending-powershell-datetime-objects\/","url_meta":{"origin":5777,"position":4},"title":"Extending PowerShell DateTime Objects","author":"Jeffery Hicks","date":"December 28, 2017","format":false,"excerpt":"I've been experimenting more with my PSTypeExtensionTools module, finding more objects to enhance.\u00a0 You can check out the project on Github and install the module from the PowerShell Gallery. My current fun has been with the DateTime object \u2013 specifically converting a value into another culture.\u00a0 Apparently those of us\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-13.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4169,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4169\/friday-fun-updated-ise-scripting-geek-module\/","url_meta":{"origin":5777,"position":5},"title":"Friday Fun: Updated ISE Scripting Geek Module","author":"Jeffery Hicks","date":"January 9, 2015","format":false,"excerpt":"A few years ago I published a module with a number of functions and enhancements for the PowerShell ISE. This ISEScriptingGeek module has remained popular over the last few years. But I wrote it for PowerShell v2. I have also come up with a number of new additions to the\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"geek","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/geek-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=5777"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5777\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}