{"id":969,"date":"2010-10-15T08:30:29","date_gmt":"2010-10-15T12:30:29","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=969"},"modified":"2013-07-02T09:08:11","modified_gmt":"2013-07-02T13:08:11","slug":"test-registry-item-revisited","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/","title":{"rendered":"Test Registry Item Revisited"},"content":{"rendered":"<p>I got some nice feedback on my original Test-RegistryItem function. I had been mulling some enhancements anyway and now have a more robust version that looks at individual values, accepts pipelined input and more The new version now lets you test if a given registry item exists as well as if the value meets some target value. First, here's the new version, with comment help removed.<\/p>\n<pre class=\"lang:ps decode:true \" >Function Test-RegistryItem {\r\n\r\n[cmdletbinding()]\r\n\t\r\nParam (\r\n\t[Parameter(Position=0,Mandatory=$True,\r\n    ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,\r\n    HelpMessage=\"Enter a registry path using the PSDrive format.\")]\r\n\t[ValidateNotNullOrEmpty()]\r\n    [Alias(\"PSPath\")]\r\n    [string]$Path,\r\n    \r\n\t[Parameter(Position=1,Mandatory=$True,\r\n    ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,\r\n    HelpMessage=\"Enter a registry key name.\")]\r\n\t[ValidateNotNullOrEmpty()]\r\n\t[Alias(\"name\",\"item\")]\r\n    [string]$Property,\r\n\r\n    [Parameter()]\r\n    [Alias(\"value\")]\r\n\t[string]$TargetValue,\r\n    \r\n    [Switch]$UseTransaction\r\n)\r\n\r\nProcess {\r\n \tWrite-Verbose (\"Looking for {0} in {1}\" -f $Property,$Path)\r\n    if (Test-Path $path) \r\n    {\r\n    \tif ($UseTransaction) \r\n    \t{\r\n    \t\t$item=Get-ItemProperty -Path $path -Name $property -ErrorAction \"SilentlyContinue\" -UseTransaction\r\n    \t} else\r\n    \t{\r\n    \t\t$item=Get-ItemProperty -Path $path -Name $property -ErrorAction \"SilentlyContinue\" \r\n    \t}\r\n    \t\r\n        if ($item ) \r\n        {\r\n            #display the item if using -Verbose\r\n        \tWrite-Verbose ($item | select * | Out-String)\r\n            $Exists=$True\r\n            if ($TargetValue)\r\n            {\r\n                $ActualValue=$item.$Property\r\n                Write-Verbose \"Retrieving value for $Property\"\r\n                if ($ActualValue -eq $TargetValue) \r\n                {\r\n                    $PropertyMatch=$True\r\n                }\r\n                else\r\n                {\r\n                    $PropertyMatch=$False\r\n                }\r\n            } #if $value\r\n        } #if $item\r\n        else \r\n        {\r\n        \tWrite-Verbose \"Not found\"\r\n            $Exists=$False\r\n            $PropertyMatch=$False\r\n        }\r\n    } #if test-path\r\n    else \r\n    {\r\n        Write-Warning \"Failed to find $path\"\r\n        $Exists=$False\r\n    }\r\n    \r\n    #create a custom object\r\n    $obj=New-Object -TypeName PSObject -Property @{\r\n        \"Path\"=$path\r\n        \"Property\"=$Property\r\n        \"Exists\"=$Exists\r\n     }\r\n     #add additional properties if looking for a property match\r\n     if ($TargetValue) \r\n     {\r\n        Write-Verbose \"Adding TargetValue Properties\"\r\n        $obj | Add-Member -MemberType NoteProperty -Name \"PropertyMatch\" -Value $PropertyMatch\r\n        $obj | Add-Member -MemberType NoteProperty -Name \"TargetValue\" -Value $TargetValue\r\n        $obj | Add-Member -MemberType NoteProperty -Name \"ActualValue\" -Value $ActualValue\r\n     }\r\n     #write the result to the pipeline\r\n     write $obj\r\n     \r\n } #end Process\r\n\r\n} #end function\r\n<\/pre>\n<p>The new version writes a custom object to the pipeline which provides more information.  Let me walk through an example of the new version.<\/p>\n<pre class=\"lang:ps decode:true \" >PS C:\\&gt; Test-RegistryItem -path \"HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon\" -Property \"AutoAdminLogon\" -TargetValue 1<\/pre>\n<p>I want to see if the AutoAdminLogon item has a value of 1. The original part of the function that verifies the path is unchanged. But now if you specify a target value, the function checks to see if the current value matches the actual value.<\/p>\n<pre class=\"lang:ps decode:true \" >if ($TargetValue)\r\n            {\r\n                $ActualValue=$item.$Property\r\n                Write-Verbose \"Retrieving value for $Property\"\r\n                if ($ActualValue -eq $TargetValue) \r\n                {\r\n                    $PropertyMatch=$True\r\n                }\r\n                else\r\n                {\r\n                    $PropertyMatch=$False\r\n                }\r\n<\/pre>\n<p>A variable is defined to indicate if the values match. I also define $Exists since the item was found. After checking for the property value, the function creates a custom object with a few baseline properties.<\/p>\n<pre class=\"lang:ps decode:true \" > \r\n #create a custom object\r\n   $obj=New-Object -TypeName PSObject -Property @{\r\n        \"Path\"=$path\r\n        \"Property\"=$Property\r\n        \"Exists\"=$Exists\r\n     }<\/pre>\n<p>If I hadn't been checking a specific property value, this object would have been written to the pipeline. But because I wanted to confirm a target value, a few additional properties are added to the object.<\/p>\n<pre class=\"lang:ps decode:true \" >if ($TargetValue) \r\n     {\r\n        Write-Verbose \"Adding TargetValue Properties\"\r\n        $obj | Add-Member -MemberType NoteProperty -Name \"PropertyMatch\" -Value $PropertyMatch\r\n        $obj | Add-Member -MemberType NoteProperty -Name \"TargetValue\" -Value $TargetValue\r\n        $obj | Add-Member -MemberType NoteProperty -Name \"ActualValue\" -Value $ActualValue\r\n     }\r\n<\/pre>\n<p>I end up with a custom object like this.<\/p>\n<pre class=\"nums:false lang:batch decode:true \" >\r\nProperty      : AutoAdminLogon\r\nPath          : HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon\r\nExists        : True\r\nPropertyMatch : False\r\nTargetValue   : 1\r\nActualValue   : 0<\/pre>\n<p>The function also takes pipelined input so I can quickly check to see what keys might be missing. And because I'm now writing an object to the pipeline I can easily filter my results.<\/p>\n<pre class=\"nums:false lang:batch decode:true \" >\r\nPS C:\\> import-csv winlogon.csv | test-registryitem | Where {-Not $_.Exists} \r\n\r\nProperty         Path                                                        Exists\r\n--------         ----                                                        ------\r\nFOODisableCAD    HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon  False\r\nFOOShutdownFlags HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon  False\r\n<\/pre>\n<p>I hope you'll download the new version and let me know what you think. Oh..and that CSV file referenced in the last example?  I've got that goody saved for another day.<\/p>\n<p>Download Test-RegistryItem v2.0 <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/Test-RegistryItem-v2.0.txt'>here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got some nice feedback on my original Test-RegistryItem function. I had been mulling some enhancements anyway and now have a more robust version that looks at individual values, accepts pipelined input and more The new version now lets you test if a given registry item exists as well as if the value meets some&#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,110,8],"tags":[224,534,560,540],"class_list":["post-969","post","type-post","status-publish","format-standard","hentry","category-powershell","category-registry","category-scripting","tag-function","tag-powershell","tag-registry","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Test Registry Item Revisited &#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\/969\/test-registry-item-revisited\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Test Registry Item Revisited &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I got some nice feedback on my original Test-RegistryItem function. I had been mulling some enhancements anyway and now have a more robust version that looks at individual values, accepts pipelined input and more The new version now lets you test if a given registry item exists as well as if the value meets some...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2010-10-15T12:30:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-07-02T13:08:11+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=\"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\\\/969\\\/test-registry-item-revisited\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Test Registry Item Revisited\",\"datePublished\":\"2010-10-15T12:30:29+00:00\",\"dateModified\":\"2013-07-02T13:08:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/\"},\"wordCount\":295,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Function\",\"PowerShell\",\"Registry\",\"Scripting\"],\"articleSection\":[\"PowerShell\",\"Registry\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/\",\"name\":\"Test Registry Item Revisited &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2010-10-15T12:30:29+00:00\",\"dateModified\":\"2013-07-02T13:08:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/969\\\/test-registry-item-revisited\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test Registry Item Revisited\"}]},{\"@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":"Test Registry Item Revisited &#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\/969\/test-registry-item-revisited\/","og_locale":"en_US","og_type":"article","og_title":"Test Registry Item Revisited &#8226; The Lonely Administrator","og_description":"I got some nice feedback on my original Test-RegistryItem function. I had been mulling some enhancements anyway and now have a more robust version that looks at individual values, accepts pipelined input and more The new version now lets you test if a given registry item exists as well as if the value meets some...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/","og_site_name":"The Lonely Administrator","article_published_time":"2010-10-15T12:30:29+00:00","article_modified_time":"2013-07-02T13:08:11+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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Test Registry Item Revisited","datePublished":"2010-10-15T12:30:29+00:00","dateModified":"2013-07-02T13:08:11+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/"},"wordCount":295,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Function","PowerShell","Registry","Scripting"],"articleSection":["PowerShell","Registry","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/","name":"Test Registry Item Revisited &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2010-10-15T12:30:29+00:00","dateModified":"2013-07-02T13:08:11+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/969\/test-registry-item-revisited\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Test Registry Item Revisited"}]},{"@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":8888,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/8888\/friday-fun-with-powershell-and-alternate-data-streams\/","url_meta":{"origin":969,"position":0},"title":"Friday Fun with PowerShell and Alternate Data Streams","author":"Jeffery Hicks","date":"February 18, 2022","format":false,"excerpt":"I have always had a peculiar fascination with alternate data streams. This is an NTFS feature that has been around for a long time. The feature, also referred to as ADS, allows a user to write data to a hidden fork of a file. You can store practically anything in\u2026","rel":"","context":"In &quot;Scripting&quot;","block_context":{"text":"Scripting","link":"https:\/\/jdhitsolutions.com\/blog\/category\/scripting\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/winrar-streams.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2613,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2613\/create-powershell-scripts-with-a-single-command\/","url_meta":{"origin":969,"position":1},"title":"Create PowerShell Scripts with a Single Command","author":"Jeffery Hicks","date":"December 5, 2012","format":false,"excerpt":"One of the drawbacks to using a PowerShell script or function is that you have to write it. For many IT Pros, especially those new to PowerShell, it can be difficult to know where to start. I think more people would write their own tools if there was an easy\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\/2011\/10\/talkbubble-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1078,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1078\/importing-and-exporting-registry-items\/","url_meta":{"origin":969,"position":2},"title":"Importing and Exporting Registry Items","author":"Jeffery Hicks","date":"January 25, 2011","format":false,"excerpt":"A while ago I posted a function to export registry items to either a CSV or XML file. Recently I had a question on Twitter about importing, which I assumed meant from my exported file. The import is actually pretty easy as I'll show you, although it did require a\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":984,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/984\/export-registry\/","url_meta":{"origin":969,"position":3},"title":"Export Registry","author":"Jeffery Hicks","date":"October 18, 2010","format":false,"excerpt":"Over the last week or so I've posted some functions for testing whether a given registry item exists or not, or even validating its value. To round this out, today I have an advanced function that makes it easier to export parts of the registry on the local computer. The\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\/2010\/10\/export-registry-help-1024x526.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/export-registry-help-1024x526.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/export-registry-help-1024x526.png?resize=525%2C300 1.5x"},"classes":[]},{"id":4005,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4005\/creating-your-own-powershell-command\/","url_meta":{"origin":969,"position":4},"title":"Creating Your Own PowerShell Command","author":"Jeffery Hicks","date":"September 10, 2014","format":false,"excerpt":"Last week, I posted a PowerShell function that you could use as an accelerator to create your own PowerShell tools. My tool takes command metadata from an existing PowerShell cmdlet and gives you the structure to create your own tool wrapped around what is in essence a proxy function. The\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"atomic powershell","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/02\/atomicps-150x150.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":510,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/510\/all-hail-dir-usealot\/","url_meta":{"origin":969,"position":5},"title":"All Hail Dir UseALot!","author":"Jeffery Hicks","date":"November 16, 2009","format":false,"excerpt":"Some of you know my relationship with the a command prompt goes back a long, long way. Naturally I became very adept at using the DIR command, fully taking advantage of its switches to tease out hidden information or to quickly get just the information I wanted. When PowerShell first\u2026","rel":"","context":"In &quot;CommandLine&quot;","block_context":{"text":"CommandLine","link":"https:\/\/jdhitsolutions.com\/blog\/category\/commandline\/"},"img":{"alt_text":"captured_Image.png","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2009\/11\/captured_Image.png_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/969","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=969"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/969\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}