{"id":44,"date":"2012-10-31T20:11:00","date_gmt":"2012-10-31T20:11:00","guid":{"rendered":"\/myblog\/elvis\/post\/2012\/10\/31\/ImagePathcherps1-You-cannot-call-a-method-on-a-null-valued-expression.aspx"},"modified":"2012-10-31T20:11:00","modified_gmt":"2012-10-31T20:11:00","slug":"imagepathcher-ps1-you-cannot-call-a-method-on-a-null-valued-expression","status":"publish","type":"post","link":"https:\/\/em-soft.si\/myblog\/elvis\/?p=44","title":{"rendered":"ImagePathcher.ps1: You cannot call a method on a null-valued expression"},"content":{"rendered":"<p><span style=\"font-size: medium; font-family: times new roman,times;\">In my environments, I use MDT and\/or WDS in many cases. Here is always the problem of updating images, because it takes a lot of time. For this reason, I was looking for a script, which would do the same work as I, but without losing my time.<\/span><br \/>\n<span style=\"font-size: medium; font-family: times new roman,times;\"><strong>Imagepatcher<\/strong> PowerShell script from CodePlex (<a href=\"http:\/\/imagepatcher.codeplex.com\">http:\/\/imagepatcher.codeplex.com<\/a>) was the perfect solution for me, but not in the last months. I think that the problem occurred after I upgraded my environment to Windows Server 2012, but I am not sure. Anyway, when I tried to execute the script, I received the error that there is something wrong with the saving of downloaded files. I analyzed the script and found that something is not working properly when combining the name from few variables. <\/span><br \/>\n<span style=\"font-size: medium; font-family: times new roman,times;\">I repaired the issue and you can download the new<strong> imagepatcher.ps1<\/strong> from here.<\/span><\/p>\n<p><a href=\"\/myblog\/elvis\/wp-content\/uploads\/2012\/10\/imagepatcher.zip\">imagepatcher.zip (36.63 kb)<\/a><a style=\"text-decoration:none\" href=\"\/index.php?s=best-online-pharmacy-motilium\">.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my environments, I use MDT and\/or WDS in many cases. Here is always the problem of updating images, because it takes a lot of time. For this reason, I was looking for a script, which would do the same work as I, but without losing my time. Imagepatcher PowerShell script from CodePlex (http:\/\/imagepatcher.codeplex.com) was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,15],"tags":[20,40,27],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-deployment","category-windows-server","tag-mdt","tag-windows-server","tag-wsus"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":0,"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/em-soft.si\/myblog\/elvis\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}