{"id":1496,"date":"2011-06-07T08:43:23","date_gmt":"2011-06-07T12:43:23","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1496"},"modified":"2018-09-03T12:06:27","modified_gmt":"2018-09-03T16:06:27","slug":"get-powershell-view-definitions","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/","title":{"rendered":"Get PowerShell View Definitions"},"content":{"rendered":"<p>When you write objects to the pipeline in Windows PowerShell, at the end of the pipeline PowerShell's formatting system handles displaying the results to the console. It accomplishes this by using a set of rules stored in XML configuration files. This is why when you run Get-Process you get a table with a pre-defined set of properties. But sometimes there are alternate views defined. For example, for process objects there is a table view called Priority. Once you know the view name you can use it.<\/p>\n<pre class=\"lang:ps decode:true \" >Get-Process | Format-Table -view Priority<\/pre>\n<p>The difficult part is finding what alternate views have been defined. For that, you can use my Get-View function.<!--more--><\/p>\n<p>This function parses out the XML configuration file, searching for view definitions.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\nFunction Get-View {\r\n\r\n\r\n[cmdletBinding()]\r\n\r\nParam(\r\n\r\n[Parameter(Position=0)]\r\n[ValidateSet(\"Table\",\"List\",\"Wide\",\"Custom\")]\r\n[string]$Control,\r\n[switch]$All\r\n)\r\n\r\n#get dotNetTypes xml data\r\nWrite-Verbose \"Parsing $pshome\\dotNettypes.format.ps1xml\"\r\n[xml]$xml=Get-Content -Path $pshome\\dotNettypes.format.ps1xml\r\n\r\nif ($Control) \r\n{\r\n    Write-Verbose \"Getting $control views only\"\r\n}\r\n\r\n#initialize an array to hold view objects\r\n$views=@()\r\n\r\n#get the view definitions\r\n$xml.configuration.viewdefinitions.view | foreach {\r\n #find what type of control to use   \r\n Switch -regex ($_.Get_InnerXML()) {\r\n        \"TableControl\" {$format=\"Table\"}\r\n        \"ListControl\" {$format=\"List\"}\r\n        \"WideControl\" {$format=\"Wide\"}\r\n        \"CustomControl\" {$format=\"Custom\"}\r\n\r\n        default {$format=\"Unknown\"}\r\n  }\r\n   \r\n   #add an object to the array     \r\n   $views+=New-Object -TypeName PSObject -Property @{\r\n       View= $_.name\r\n       Class=$_.ViewSelectedBy.TypeName\r\n       Format=$format\r\n   }\r\n   \r\n} #foreach\r\n\r\nWrite-Verbose \"Found a total of $($views.count) views before filtering\"\r\n#by default only get custom views which unless -All is specified\r\nif (-Not $All) \r\n{\r\n  $views=$views | Where {$_.Class -ne $_.View}\r\n}\r\n#if a specific control type was called for, then only write\r\n   #matching objects\r\n   if ($Control)\r\n   {\r\n      $views | where {$_.Format -eq $Control}\r\n   }\r\n   Else\r\n   {\r\n      #else write all objects\r\n      $views\r\n   }\r\n\r\nWrite-Verbose \"Finished\"\r\n\r\n} #end Function\r\n<\/pre>\n<p>The function uses a Switch contruct to parse out the inner xml for each view to identify whether it is a table, list, wide or custom.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\n\r\n$xml.configuration.viewdefinitions.view | foreach {\r\n #find what type of control to use   \r\n Switch -regex ($_.Get_InnerXML()) {\r\n        \"TableControl\" {$format=\"Table\"}\r\n        \"ListControl\" {$format=\"List\"}\r\n        \"WideControl\" {$format=\"Wide\"}\r\n        \"CustomControl\" {$format=\"Custom\"}\r\n\r\n        default {$format=\"Unknown\"}\r\n  }\r\n<\/pre>\n<p>I then take data from each XML node and add a custom object to a temporary array.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\n\r\n$views+=New-Object -TypeName PSObject -Property @{\r\n       View= $_.name\r\n       Class=$_.ViewSelectedBy.TypeName\r\n       Format=$format\r\n   }\r\n<\/pre>\n<p>The temporary array is so that I can write filtered data to the pipeline in a few ways. One thing you have to keep in mind is that default views are also defined here. Typically, but not always, if the view name matches the class name, it is a default view. So by default I filter those out, unless you use the -All parameter.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\nif (-Not $All) \r\n{\r\n  $views=$views | Where {$_.Class -ne $_.View}\r\n}\r\n<\/pre>\n<p>The second type of filtering you can do is by the control. The default behavior is to show you everything. But you can limit your search to a particular control like List.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\n   if ($Control)\r\n   {\r\n     $views | where {$_.Format -eq $Control}\r\n   }\r\n   Else\r\n   {\r\n  #else write all objects\r\n     $views\r\n   }\r\n<\/pre>\n<p>Once loaded into your PowerShell session, you might use it like this:<\/p>\n<pre class=\"lang:ps decode:true \" >\r\n\r\nPS E:\\> get-view table | format-table -auto\r\n\r\nCClass                                     Format View\r\n-----                                     ------ ----\r\nSystem.Collections.DictionaryEntry        Table  Dictionary\r\nSystem.Diagnostics.ProcessModule          Table  ProcessModule\r\nSystem.Diagnostics.Process                Table  process\r\nSystem.Management.Automation.PSSnapInInfo Table  PSSnapInInfo\r\nSystem.Diagnostics.Process                Table  Priority\r\nSystem.Diagnostics.Process                Table  StartTime\r\nSystem.ServiceProcess.ServiceController   Table  service\r\n<\/pre>\n<p>Once I've discoverd that the PSSnapin object has an alternate table view, I can use it.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-300x83.png\" alt=\"\" title=\"format-alternate-view\" width=\"300\" height=\"83\" class=\"aligncenter size-medium wp-image-1497\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-300x83.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-1024x285.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view.png 1361w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The complete script includes comment based help. Download <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/Get-View.txt' taget='_blank'>Get-View<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you write objects to the pipeline in Windows PowerShell, at the end of the pipeline PowerShell&#8217;s formatting system handles displaying the results to the console. It accomplishes this by using a set of rules stored in XML configuration files. This is why when you run Get-Process you get a table with a pre-defined set&#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":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[75,8],"tags":[296,295,534,140,189,206],"class_list":["post-1496","post","type-post","status-publish","format-standard","hentry","category-powershell-v2-0","category-scripting","tag-format-list","tag-format-table","tag-powershell","tag-ps1xml","tag-switch","tag-xml"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Get PowerShell View Definitions &#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\/scripting\/1496\/get-powershell-view-definitions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get PowerShell View Definitions &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"When you write objects to the pipeline in Windows PowerShell, at the end of the pipeline PowerShell&#039;s formatting system handles displaying the results to the console. It accomplishes this by using a set of rules stored in XML configuration files. This is why when you run Get-Process you get a table with a pre-defined set...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-07T12:43:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-09-03T16:06:27+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-300x83.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\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Get PowerShell View Definitions\",\"datePublished\":\"2011-06-07T12:43:23+00:00\",\"dateModified\":\"2018-09-03T16:06:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/\"},\"wordCount\":299,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/06\\\/format-alternate-view-300x83.png\",\"keywords\":[\"format-list\",\"format-table\",\"PowerShell\",\"ps1xml\",\"switch\",\"xml\"],\"articleSection\":[\"PowerShell v2.0\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/\",\"name\":\"Get PowerShell View Definitions &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/06\\\/format-alternate-view-300x83.png\",\"datePublished\":\"2011-06-07T12:43:23+00:00\",\"dateModified\":\"2018-09-03T16:06:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/06\\\/format-alternate-view.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/06\\\/format-alternate-view.png\",\"width\":\"1361\",\"height\":\"380\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/1496\\\/get-powershell-view-definitions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell v2.0\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell-v2-0\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get PowerShell View Definitions\"}]},{\"@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":"Get PowerShell View Definitions &#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\/scripting\/1496\/get-powershell-view-definitions\/","og_locale":"en_US","og_type":"article","og_title":"Get PowerShell View Definitions &#8226; The Lonely Administrator","og_description":"When you write objects to the pipeline in Windows PowerShell, at the end of the pipeline PowerShell's formatting system handles displaying the results to the console. It accomplishes this by using a set of rules stored in XML configuration files. This is why when you run Get-Process you get a table with a pre-defined set...","og_url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-06-07T12:43:23+00:00","article_modified_time":"2018-09-03T16:06:27+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-300x83.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\/scripting\/1496\/get-powershell-view-definitions\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Get PowerShell View Definitions","datePublished":"2011-06-07T12:43:23+00:00","dateModified":"2018-09-03T16:06:27+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/"},"wordCount":299,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-300x83.png","keywords":["format-list","format-table","PowerShell","ps1xml","switch","xml"],"articleSection":["PowerShell v2.0","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/","url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/","name":"Get PowerShell View Definitions &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view-300x83.png","datePublished":"2011-06-07T12:43:23+00:00","dateModified":"2018-09-03T16:06:27+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/06\/format-alternate-view.png","width":"1361","height":"380"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1496\/get-powershell-view-definitions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell v2.0","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},{"@type":"ListItem","position":2,"name":"Get PowerShell View Definitions"}]},{"@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":6518,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6518\/powershell-format-files-the-easy-way\/","url_meta":{"origin":1496,"position":0},"title":"PowerShell Format Files the Easy Way","author":"Jeffery Hicks","date":"February 18, 2019","format":false,"excerpt":"Whenever I teach or present on PowerShell scripting, I'm always talking about writing objects to the pipeline. Most of the time you can simply let PowerShell format and display output of your command to the best of its ability. However, you may wish to take matters into your own hands\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\/2019\/02\/image_thumb-7.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-7.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-7.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-7.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7774,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7774\/easy-powershell-custom-formatting\/","url_meta":{"origin":1496,"position":1},"title":"Easy PowerShell Custom Formatting","author":"Jeffery Hicks","date":"October 15, 2020","format":false,"excerpt":"One of the features I truly enjoy about PowerShell, is the ability to have it present information that I need in a form that I want. Here's a good example. Running Get-Process is simple enough and the output is pretty complete. But one thing that would make it better for\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\/2020\/10\/get-process-ansi.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/10\/get-process-ansi.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/10\/get-process-ansi.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/10\/get-process-ansi.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/10\/get-process-ansi.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":6478,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6478\/powershell-scripting-getting-git-size-retooled\/","url_meta":{"origin":1496,"position":2},"title":"Getting Git Size with PowerShell Retooled","author":"Jeffery Hicks","date":"January 30, 2019","format":false,"excerpt":"A few days ago I wrote about my experiences in designing a PowerShell function that reports on the size of the hidden .git folder. In that version of the function I decided to include a parameter that would permit the user to get the size pre-formatted as either KB, MB\u2026","rel":"","context":"In &quot;Git&quot;","block_context":{"text":"Git","link":"https:\/\/jdhitsolutions.com\/blog\/category\/git\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3718,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3718\/theres-sum-thing-happening-here\/","url_meta":{"origin":1496,"position":3},"title":"There&#8217;s Sum-thing Happening Here","author":"Jeffery Hicks","date":"February 24, 2014","format":false,"excerpt":"I am one of those IT Pros who keeps close tabs on system resources. I like to know what is being used and by what. As you might imagine, a cmdlet like Get-Process, is pretty useful to me. One of the things I'm always checking is how much memory Google\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"calculator","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/02\/calculator.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":8798,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8798\/tell-powershell-what-you-want\/","url_meta":{"origin":1496,"position":4},"title":"Tell PowerShell What You Want","author":"Jeffery Hicks","date":"January 18, 2022","format":false,"excerpt":"I saw a question on Twitter the other day about how to include the Notes property when running the Get-VM Hyper-V cmdlet. I'm reading between the lines, but I think the desired goal was to include the Notes property. Here are a few ways you might tackle this problem. And\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\/2022\/01\/new-formatview.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/01\/new-formatview.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/01\/new-formatview.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/01\/new-formatview.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":9229,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9229\/exposing-the-mystery-of-powershell-objects\/","url_meta":{"origin":1496,"position":5},"title":"Exposing the Mystery of PowerShell Objects","author":"Jeffery Hicks","date":"March 14, 2023","format":false,"excerpt":"A few weeks ago, I was working on content for a new PowerShell course for Pluralsight. The subject was objects. We all know the importance of working with objects in PowerShell. Hopefully, you also know that the output you get on your screen from running a PowerShell command is not\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\/2023\/03\/2023-03-14_10-19-52.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-14_10-19-52.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-14_10-19-52.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1496","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=1496"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1496\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}