{"id":2188,"date":"2012-04-11T12:01:15","date_gmt":"2012-04-11T16:01:15","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=2188"},"modified":"2012-05-15T10:09:07","modified_gmt":"2012-05-15T14:09:07","slug":"powershell-scripting-with-validaterange","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/","title":{"rendered":"PowerShell Scripting with [ValidateRange]"},"content":{"rendered":"<p>After my post yesterday on using the ValidateScript attribute with PSCredentials, I thought you might find it helpful to have a brief discussion on some other parameter validation attributes such as [ValidateRange()]. You can use this attribute if you want to verify that a given parameter value falls between some range. Typically this is used for numeric values. This attribute is quite easy to use. Here's a sample script.<\/p>\n<p><code lang=\"Powershell\"><br \/>\nParam (<br \/>\n[Parameter(Position=0)]<br \/>\n[string]$Property=\"WorkingSet\",<br \/>\n[Parameter(Position=1,Mandatory=$True,HelpMessage=\"How many top processes do you want? The maximum is 20.\")]<br \/>\n[ValidateRange(1,20)]<br \/>\n[string]$Count,<br \/>\n[ValidateNotNullOrEmpty()]<br \/>\n[string]$Computername=$env:computername<br \/>\n)<\/p>\n<p>$msg=\"Getting top {0} processes from {1} sorted by {2}\" -f $Count,$Computername,$Property<br \/>\nWrite-Host $msg -ForegroundColor Green<\/p>\n<p>Get-Process -ComputerName $computername | Sort -Property $property -Descending | Select -first $Count<br \/>\n<\/code><\/p>\n<p>This script gets the top X number of processes from a computer based on a user-specified property. The default property is WorkingSet. The Count property has [ValidateRange()] attribute that dictates that any value must be between 1 and 20. If you enter a value outside of that range, PowerShell will throw an exception and the script will not run.<\/p>\n<p><code lang=\"DOS\"><br \/>\nPS S:\\> .\\Demo-ValidateRange.ps1 -Count 25<br \/>\nC:\\scripts\\Demo-ValidateRange.ps1 : Cannot validate argument on parameter 'Coun<br \/>\nt'. The 25 argument is greater than the maximum allowed range of 20. Supply an<br \/>\nargument that is less than 20 and then try the command again.<br \/>\nAt line:1 char:32<br \/>\n+ .\\Demo-ValidateRange.ps1 -Count <<<< 25\n+ CategoryInfo : InvalidData: (:) [Demo-ValidateRange.ps1], Param\neterBindingValidationException\n+ FullyQualifiedErrorId : ParameterArgumentValidationError,Demo-ValidateRa\nnge.ps1\n\nPS S:\\>.\\Demo-ValidateRange.ps1 -Count 3<br \/>\nGetting top 3 processes from SERENITY sorted by WorkingSet<\/p>\n<p>Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName<br \/>\n------- ------ ----- ----- ----- ------ -- -----------<br \/>\n2288 121 201804 287396 622 1,748.24 7088 chrome<br \/>\n775 111 254700 263620 501 102.31 8104 thunderbird<br \/>\n619 39 254124 261376 472 2,155.51 1152 svchost<br \/>\n<\/code><\/p>\n<p>Of course, you can skip this and add your own validation test within your script if you prefer to handle errors on your own and perhaps a bit more gracefully.<\/p>\n<p>Using [ValidateRange()] really only works with numeric values. If you wanted to validate if a datetime value fell within a range, you'll have to turn to something else. At least I have yet to find a way to use [ValidateRange()] with anything other than numbers. But we have options and I'll be back to show you some of them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After my post yesterday on using the ValidateScript attribute with PSCredentials, I thought you might find it helpful to have a brief discussion on some other parameter validation attributes such as [ValidateRange()]. You can use this attribute if you want to verify that a given parameter value falls between some range. Typically this is used&#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":[4,8],"tags":[307,534,540,371],"class_list":["post-2188","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-parameter","tag-powershell","tag-scripting","tag-validaterange"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PowerShell Scripting with [ValidateRange] &#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\/2188\/powershell-scripting-with-validaterange\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell Scripting with [ValidateRange] &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"After my post yesterday on using the ValidateScript attribute with PSCredentials, I thought you might find it helpful to have a brief discussion on some other parameter validation attributes such as [ValidateRange()]. You can use this attribute if you want to verify that a given parameter value falls between some range. Typically this is used...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2012-04-11T16:01:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-05-15T14:09:07+00:00\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"PowerShell Scripting with [ValidateRange]\",\"datePublished\":\"2012-04-11T16:01:15+00:00\",\"dateModified\":\"2012-05-15T14:09:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/\"},\"wordCount\":222,\"commentCount\":9,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"parameter\",\"PowerShell\",\"Scripting\",\"ValidateRange\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/\",\"name\":\"PowerShell Scripting with [ValidateRange] &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2012-04-11T16:01:15+00:00\",\"dateModified\":\"2012-05-15T14:09:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2188\\\/powershell-scripting-with-validaterange\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell Scripting with [ValidateRange]\"}]},{\"@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":"PowerShell Scripting with [ValidateRange] &#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\/2188\/powershell-scripting-with-validaterange\/","og_locale":"en_US","og_type":"article","og_title":"PowerShell Scripting with [ValidateRange] &#8226; The Lonely Administrator","og_description":"After my post yesterday on using the ValidateScript attribute with PSCredentials, I thought you might find it helpful to have a brief discussion on some other parameter validation attributes such as [ValidateRange()]. You can use this attribute if you want to verify that a given parameter value falls between some range. Typically this is used...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/","og_site_name":"The Lonely Administrator","article_published_time":"2012-04-11T16:01:15+00:00","article_modified_time":"2012-05-15T14:09:07+00:00","author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"PowerShell Scripting with [ValidateRange]","datePublished":"2012-04-11T16:01:15+00:00","dateModified":"2012-05-15T14:09:07+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/"},"wordCount":222,"commentCount":9,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["parameter","PowerShell","Scripting","ValidateRange"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/","name":"PowerShell Scripting with [ValidateRange] &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2012-04-11T16:01:15+00:00","dateModified":"2012-05-15T14:09:07+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2188\/powershell-scripting-with-validaterange\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"PowerShell Scripting with [ValidateRange]"}]},{"@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":2206,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2206\/powershell-scripting-with-validateset\/","url_meta":{"origin":2188,"position":0},"title":"PowerShell Scripting with [ValidateSet]","author":"Jeffery Hicks","date":"April 16, 2012","format":false,"excerpt":"Today we'll continue our exploration of the parameter validation attributes you can use in you PowerShell scripting. We've already looked at [ValidateRange] and [ValidateScript]. Another attribute you are likely to use is [ValidateSet()]. You can use this to verify that the parameter value belongs to a pre-defined set. To use,\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":2193,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2193\/powershell-scripting-with-validatescript\/","url_meta":{"origin":2188,"position":1},"title":"PowerShell Scripting with [ValidateScript]","author":"Jeffery Hicks","date":"April 12, 2012","format":false,"excerpt":"The last few days we've been looking at parameter validation attributes you might use in a script of function. Yesterday I wrote about [ValidateRange] and demonstrated how you might use it. That attribute works fine for any values that can be evaluated as numbers. But dates are a different story.\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":2247,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/2247\/powershell-scripting-with-validatecount\/","url_meta":{"origin":2188,"position":2},"title":"PowerShell Scripting with [ValidateCount]","author":"Jeffery Hicks","date":"April 26, 2012","format":false,"excerpt":"Here's another parameter validation attribute you might want to use in your PowerShell scripting and functions. If your parameter can take an array of values, you might want to limit that array to a certain size. For example, your parameter can take an array of computer names but you don't\u2026","rel":"","context":"In &quot;PowerShell v2.0&quot;","block_context":{"text":"PowerShell v2.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/validatecount-ok-300x66.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3830,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3830\/test-subnet-with-powershell\/","url_meta":{"origin":2188,"position":3},"title":"Test Subnet with PowerShell","author":"Jeffery Hicks","date":"April 25, 2014","format":false,"excerpt":"A few years ago I published a PowerShell function to test IP addresses on a given subnet. I had an email the other day about it and I decided to refresh it. My new version adds a few bells and whistles that I think you might like. For example, you\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"keyboardanalyze","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/07\/keyboardanalyze-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2306,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/2306\/powershell-scripting-with-validatenotnullorempty\/","url_meta":{"origin":2188,"position":4},"title":"PowerShell Scripting with [ValidateNotNullorEmpty]","author":"Jeffery Hicks","date":"May 15, 2012","format":false,"excerpt":"I've been writing about the different parameter validation attributes that you can use in your PowerShell scripting. One that I use in practically every script is [ValidateNotNullorEmpty()]. This validation will ensure that something is passed as a parameter value. I'm not talking about making a parameter mandatory; only that if\u2026","rel":"","context":"In &quot;PowerShell v2.0&quot;","block_context":{"text":"PowerShell v2.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/validatenotnullorempty-300x141.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2219,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2219\/powershell-scripting-with-validatelength\/","url_meta":{"origin":2188,"position":5},"title":"PowerShell Scripting with [ValidateLength]","author":"Jeffery Hicks","date":"April 20, 2012","format":false,"excerpt":"In continuing the exploration of parameter validation attributes, today we'll look at [ValidateLength()]. You can use this attribute in your PowerShell scripting to validate that a parameter value is at least a certain length and no more and a certain length. In other words, it has to be just right.\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\/2012\/04\/thisbig.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2188","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=2188"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2188\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}