{"id":55,"date":"2019-03-25T17:30:19","date_gmt":"2019-03-25T17:30:19","guid":{"rendered":"http:\/\/yer.ac\/blog\/?p=55"},"modified":"2019-03-25T20:24:50","modified_gmt":"2019-03-25T20:24:50","slug":"recursive-folder-comparison-with-powershell","status":"publish","type":"post","link":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/","title":{"rendered":"Recursive folder comparison with PowerShell"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">The Issue<\/h2>\n\n\n\n<p>This post definitely isn&#8217;t &#8220;new&#8221; or revolutionary, but I was quite surprised to find the Compare-object helper in PS, and I&#8217;m bound to forget in the future&#8230; <\/p>\n\n\n\n<p>As part of some recent roadmap work, we moved over to a new installer technology for some of our tooling. This came with some minor headaches such as validating we have harvested all the correct files. The first iteration of this was a manual check which obviously is prone is human error &#8211; aside from being mind numbing!<\/p>\n\n\n\n<p><strong>I didn&#8217;t really want to use a third party tool. <\/strong><a href=\"http:\/\/winmerge.org\/?lang=en\">WinMerge <\/a>can perform fantastic comparisons, but I wanted something quick and custom. Ideally also not spending longer than 10 minutes creating any code!<\/p>\n\n\n\n<p>The first iteration was to do a recursive loop, pull out all the file names (Note: not the path) into 2 separate text files. The only &#8220;nicety&#8221; was I wrapped directory names in square brackets to give it <em>some<\/em> organisation.<\/p>\n\n\n\n<p>The downside of this is that it only really worked for my sample folder with a few items. In production with thousands of files and nested folders this was plain chaos. Also I had to compare these files in a third party tool like WinMerge anyway &#8211; taking away the point of doing this!<\/p>\n\n\n\n<p>The final version of my script aimed to only show the difference (avoid noise), ideally show which direction the change occurred  using <strong>Compare-Object<\/strong> in PowerShell.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Result<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Do a recursive loop through the directory structure<\/li><li>Output Folder names as [Folder], and recursively dive-down. This is a bit dirty as I didn&#8217;t want the full path (harder to compare) but wanted to differentiate when I dug down. YMMV.<\/li><li>Output File names, excluding some files I didn&#8217;t care about (Like .tmp &amp; .XML files)<\/li><li>Do this for folder A and folder B, storing the result to a variable<\/li><li>Using Compare-Object on these variables and outputting the result.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>function GetFiles($path, [string[]]$excludedFiles)\n{\n    foreach ($item in Get-ChildItem $path)\n    {\n        if ($excludedFiles | Where {$item -like $_}) { continue }\n\n        if( (Get-Item $item.FullName) -is [System.IO.DirectoryInfo]){\n         $('['+$item.Name+']')\n        }else{\n          $($item.Name)\n        }\n        if (Test-Path $item.FullName -PathType Container)\n        {\n            GetFiles $item.FullName $excludedFiles\n        }\n    }\n} \n$env1 = GetFiles -path \"C:\\folderA\\\" -excludedFiles \"*.xml\",\".tmp\"\n$env2 = GetFiles -path \"C:\\folderB\\\"  -excludedFiles \"*.xml\",\".tmp\"\n\nCompare-Object -DifferenceObject $env1 -ReferenceObject $env2<\/code><\/pre>\n\n\n\n<p>Which provides output like:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"571\" height=\"93\" data-attachment-id=\"61\" data-permalink=\"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/image-12\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?fit=571%2C93&amp;ssl=1\" data-orig-size=\"571,93\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?fit=571%2C93&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?resize=571%2C93\" alt=\"\" class=\"wp-image-61\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?w=571&amp;ssl=1 571w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?resize=300%2C49&amp;ssl=1 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/figure>\n\n\n\n<p><strong>This could definitely be optimized and cleaned up for sure, and YMMV massively. <\/strong><\/p>\n\n\n\n<p>Overall, a few minutes in PowerShell and  I managed to save substantial time &#8211; and that was my only real goal!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Issue This post definitely isn&#8217;t &#8220;new&#8221; or revolutionary, but I was quite surprised to find the Compare-object helper in PS, and I&#8217;m bound to forget in the future&#8230; As part of some recent roadmap work, we moved over to a new installer technology for some of our tooling. This came with some minor headaches &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","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":[7],"tags":[10],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-devops","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Recursive folder comparison with PowerShell - yer.ac | Adventures of a developer, and other things.<\/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:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Recursive folder comparison with PowerShell - yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"og:description\" content=\"The Issue This post definitely isn&#8217;t &#8220;new&#8221; or revolutionary, but I was quite surprised to find the Compare-object helper in PS, and I&#8217;m bound to forget in the future&#8230; As part of some recent roadmap work, we moved over to a new installer technology for some of our tooling. This came with some minor headaches &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T17:30:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-25T20:24:50+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png\" \/>\n<meta name=\"author\" content=\"yer.ac\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yer.ac\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/\"},\"author\":{\"name\":\"yer.ac\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"headline\":\"Recursive folder comparison with PowerShell\",\"datePublished\":\"2019-03-25T17:30:19+00:00\",\"dateModified\":\"2019-03-25T20:24:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/\"},\"wordCount\":365,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/image-11.png\",\"keywords\":[\"PowerShell\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/\",\"name\":\"Recursive folder comparison with PowerShell - yer.ac | Adventures of a developer, and other things.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/image-11.png\",\"datePublished\":\"2019-03-25T17:30:19+00:00\",\"dateModified\":\"2019-03-25T20:24:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/image-11.png?fit=571%2C93&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/image-11.png?fit=571%2C93&ssl=1\",\"width\":571,\"height\":93},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2019\\\/03\\\/25\\\/recursive-folder-comparison-with-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Recursive folder comparison with PowerShell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\",\"name\":\"yer.ac | Adventures of a developer, and other things.\",\"description\":\"Blog to keep track of things I am upto\",\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yer.ac\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\",\"name\":\"yer.ac\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"caption\":\"yer.ac\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Recursive folder comparison with PowerShell - yer.ac | Adventures of a developer, and other things.","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:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Recursive folder comparison with PowerShell - yer.ac | Adventures of a developer, and other things.","og_description":"The Issue This post definitely isn&#8217;t &#8220;new&#8221; or revolutionary, but I was quite surprised to find the Compare-object helper in PS, and I&#8217;m bound to forget in the future&#8230; As part of some recent roadmap work, we moved over to a new installer technology for some of our tooling. This came with some minor headaches &hellip;","og_url":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/","og_site_name":"yer.ac | Adventures of a developer, and other things.","article_published_time":"2019-03-25T17:30:19+00:00","article_modified_time":"2019-03-25T20:24:50+00:00","og_image":[{"url":"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png","type":"","width":"","height":""}],"author":"yer.ac","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yer.ac","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#article","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/"},"author":{"name":"yer.ac","@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"headline":"Recursive folder comparison with PowerShell","datePublished":"2019-03-25T17:30:19+00:00","dateModified":"2019-03-25T20:24:50+00:00","mainEntityOfPage":{"@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/"},"wordCount":365,"commentCount":0,"publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"image":{"@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#primaryimage"},"thumbnailUrl":"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png","keywords":["PowerShell"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/","url":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/","name":"Recursive folder comparison with PowerShell - yer.ac | Adventures of a developer, and other things.","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#primaryimage"},"image":{"@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#primaryimage"},"thumbnailUrl":"http:\/\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png","datePublished":"2019-03-25T17:30:19+00:00","dateModified":"2019-03-25T20:24:50+00:00","breadcrumb":{"@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#primaryimage","url":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?fit=571%2C93&ssl=1","contentUrl":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/03\/image-11.png?fit=571%2C93&ssl=1","width":571,"height":93},{"@type":"BreadcrumbList","@id":"https:\/\/yer.ac\/blog\/2019\/03\/25\/recursive-folder-comparison-with-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yer.ac\/blog\/"},{"@type":"ListItem","position":2,"name":"Recursive folder comparison with PowerShell"}]},{"@type":"WebSite","@id":"https:\/\/yer.ac\/blog\/#website","url":"https:\/\/yer.ac\/blog\/","name":"yer.ac | Adventures of a developer, and other things.","description":"Blog to keep track of things I am upto","publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yer.ac\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d","name":"yer.ac","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","caption":"yer.ac"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paP5IW-T","jetpack-related-posts":[{"id":333,"url":"https:\/\/yer.ac\/blog\/2019\/11\/06\/pragmatically-upgrading-net-framework-version-for-all-projects-with-powershell\/","url_meta":{"origin":55,"position":0},"title":"Pragmatically upgrading .net framework version for  all projects with PowerShell","author":"yer.ac","date":"November 6, 2019","format":false,"excerpt":"We had a situation where we needed to upgrade all the CSPROJ files in a solution to 4.8. The issue is that some of our solutions contain almost a hundred projects so a manual intervention would be prone to error. (plus we have multiple solutions to apply this against!) Whilst\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":508,"url":"https:\/\/yer.ac\/blog\/2021\/06\/29\/consuming-a-json-file-for-automatic-params-in-powershell\/","url_meta":{"origin":55,"position":1},"title":"Consuming a JSON file for automatic params in PowerShell","author":"yer.ac","date":"June 29, 2021","format":false,"excerpt":"More of a note for future me.... Typically in PowerShell when there is a requirement for reading an external file to set parameters, I would read in a file using the Get-Content and converting it to JSON, perhaps something like $json = Get-Content 'C:\\file.json' | Out-String | ConvertFrom-Json # To\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/yer.ac\/blog\/category\/devops\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":514,"url":"https:\/\/yer.ac\/blog\/2021\/10\/06\/fixing-hostfxr-dll-could-not-be-found-within-windows-docker-container-net-installed-from-dotnet-install-ps1\/","url_meta":{"origin":55,"position":2},"title":"Fixing &#8220;hostfxr.dll could not be found&#8221; within Windows Docker container (.NET installed from dotnet-install.ps1)","author":"yer.ac","date":"October 6, 2021","format":false,"excerpt":"This is here mostly for my own reference for next time I need to fix this, but may be useful to someone else. Installing .NET (5, Core, etc.) via the Microsoft Supplied \"dotnet-install.ps1\"(https:\/\/docs.microsoft.com\/en-us\/dotnet\/core\/tools\/dotnet-install-script) installs the frameworks fine, but then running .net core code within that windows container would sometimes yield\u2026","rel":"","context":"In &quot;Docker&quot;","block_context":{"text":"Docker","link":"https:\/\/yer.ac\/blog\/category\/devops\/docker\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2021\/10\/image.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":337,"url":"https:\/\/yer.ac\/blog\/2019\/11\/20\/identifying-nuget-package-references-which-are-using-relative-paths-across-whole-solution\/","url_meta":{"origin":55,"position":3},"title":"Identifying Nuget package references which are using relative paths across whole solution","author":"yer.ac","date":"November 20, 2019","format":false,"excerpt":"Keeping up with a recent binge upgrading projects, including upgrading all my projects in a solution to 4.8, I have been upgrading nuget packages. Whilst this is a relatively simple task, what irks me is that when you add or upgrade a nuget package in Visual Studio, it will often\u2026","rel":"","context":"In &quot;Development&quot;","block_context":{"text":"Development","link":"https:\/\/yer.ac\/blog\/category\/development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/11\/image-2.png?fit=376%2C382&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":236,"url":"https:\/\/yer.ac\/blog\/2019\/06\/27\/level-up-retrospectives\/","url_meta":{"origin":55,"position":4},"title":"\ud83d\udc46Level up\ud83d\udc46 your retrospectives! (and why you should run one!).","author":"yer.ac","date":"June 27, 2019","format":false,"excerpt":"You can also view this post on: https:\/\/dev.to\/wabbbit Regardless of which Agile methodology you use to deliver your software - You are using one, right?, retrospective is one of the most important meetings you can have. Sadly, it's one of those meetings that can turn into an unstructured nightmare, and\u2026","rel":"","context":"In &quot;Productivity&quot;","block_context":{"text":"Productivity","link":"https:\/\/yer.ac\/blog\/category\/productivity\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2019\/06\/349mrs1.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":576,"url":"https:\/\/yer.ac\/blog\/2025\/08\/18\/vibing-in-kiro-to-create-a-self-serve-portainer-wrapper\/","url_meta":{"origin":55,"position":5},"title":"Vibing in Kiro to create a self-serve Portainer wrapper.","author":"yer.ac","date":"August 18, 2025","format":false,"excerpt":"On a Friday afternoon with half an hour to spare, I tested Kiro, Amazon\u2019s new agentic IDE, against a real-world problem: giving my team a simple way to start and stop Docker services in Portainer. With nothing more than a rough prompt, a PowerShell script, and a few \u201cTrust command\u201d\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/yer.ac\/blog\/category\/development\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2025\/08\/Untitled-1.png?fit=1200%2C649&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2025\/08\/Untitled-1.png?fit=1200%2C649&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2025\/08\/Untitled-1.png?fit=1200%2C649&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2025\/08\/Untitled-1.png?fit=1200%2C649&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2025\/08\/Untitled-1.png?fit=1200%2C649&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":7,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":64,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/55\/revisions\/64"}],"wp:attachment":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}