{"id":153,"date":"2023-04-26T17:28:47","date_gmt":"2023-04-26T13:28:47","guid":{"rendered":"https:\/\/eliesalameh.pro\/?p=153"},"modified":"2023-04-26T17:57:54","modified_gmt":"2023-04-26T13:57:54","slug":"issue-with-pnp-powershell-2-1-1","status":"publish","type":"post","link":"https:\/\/eliesalameh.pro\/index.php\/2023\/04\/26\/issue-with-pnp-powershell-2-1-1\/","title":{"rendered":"Issue with PnP.PowerShell 2.1.1"},"content":{"rendered":"\n<p class=\"has-small-font-size\"><strong>Connect-PnPOnline : The &#8216;Connect-PnPOnline&#8217; command was found in the module &#8216;PnP.PowerShell&#8217;, but the module could not be loaded. For more information, run &#8216;Import-Module PnP.PowerShell&#8217;.<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>If you are struggling with this error like i did for some time i found the easiest fix for it is to remove the 2.1.1 version and keep the 1.12.0 version of PnP.PowerShell. Hoping the Issue will be solved in PnP 2.1.1 or newer releases but until then I can&#8217;t Upgrade yet.<\/p>\n\n\n\n<p>How to remove this version:<\/p>\n\n\n\n<p>Run CMD as Administrator <\/p>\n\n\n\n<p>Type PowerShell and hit Enter<\/p>\n\n\n\n<p>then run the command <\/p>\n\n\n\n<p><code>Uninstall-Module<\/code> <code>-Name<\/code> <code>PnP.PowerShell<\/code> <code>-AllVersions<\/code> <code>-Force<\/code><\/p>\n\n\n\n<p>to install the earlier version use the following command<\/p>\n\n\n\n<p><code>Install-Module PnP.PowerShell -RequiredVersion 1.12.0 -Force<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connect-PnPOnline : The &#8216;Connect-PnPOnline&#8217; command was found in the module &#8216;PnP.PowerShell&#8217;, but the module could not be loaded. For more information, run &#8216;Import-Module PnP.PowerShell&#8217;. If you are struggling with this error like i did for some time i found the easiest fix for it is to remove the 2.1.1 version and keep the 1.12.0 version [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":156,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pmpro_default_level":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[43,44],"tags":[47,45,46,48,49],"class_list":["post-153","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-pnp-powershell","tag-automation","tag-pnp-powershell","tag-powershell","tag-sharepoint-online","tag-sharepoint-scripting","pmpro-has-access"],"jetpack_featured_media_url":"https:\/\/eliesalameh.pro\/wp-content\/uploads\/2023\/04\/powershell.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":1,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/posts\/153\/revisions\/155"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/media\/156"}],"wp:attachment":[{"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eliesalameh.pro\/index.php\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}