{"id":587,"date":"2015-01-06T09:40:38","date_gmt":"2015-01-06T08:40:38","guid":{"rendered":"http:\/\/lestfrexgn.cluster020.hosting.ovh.net\/?p=587"},"modified":"2015-01-06T09:40:38","modified_gmt":"2015-01-06T08:40:38","slug":"sccm-2012-powershell-ise-add-ons-de-connection","status":"publish","type":"post","link":"https:\/\/les2t.fr\/fr_fr\/sccm-2012-powershell-ise-add-ons-de-connection\/","title":{"rendered":"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection"},"content":{"rendered":"<p><a href=\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-83 aligncenter\" src=\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg\" alt=\"sccm2012\" width=\"300\" height=\"159\" srcset=\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg 300w, https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012.jpg 314w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Je vous pr\u00e9sente aujourd\u2019hui un moyen rapide de charger le module ConfigMgr PowerShell dans la console PowerShell ISE.<!--more--><br \/>\n<a href=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-589 aligncenter\" src=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE1-300x104.jpg\" alt=\"powershellISE1\" width=\"300\" height=\"104\" srcset=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE1-300x104.jpg 300w, https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE1.jpg 411w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nPour cela nous allons proc\u00e9der \u00e0 la configuration d\u2019un profil personnalis\u00e9 de PowerShell ISE.<br \/>\nAllez dans %UserPROFILE%\\Documents et cr\u00e9er s\u2019il n\u2019existe pas un r\u00e9pertoire WindowsPowerShell.<br \/>\nCr\u00e9ez un fichier appel\u00e9 Microsoft.PowerShellISE_Profile.ps1<br \/>\nCe fichier est automatiquement charg\u00e9 lorsque l&rsquo;ISE d\u00e9marre, ce qui est vraiment pratique pour le chargement automatique des fonctions communes.<\/p>\n<p><a href=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-590 aligncenter\" src=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE2-300x83.jpg\" alt=\"powershellISE2\" width=\"300\" height=\"83\" srcset=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE2-300x83.jpg 300w, https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE2.jpg 500w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nMaintenant, \u00e9ditez le fichier soit dans le PowerShell ISE ou le Bloc-notes et coller dans mon script.\u00a0 Si vous avez d\u00e9j\u00e0 cr\u00e9\u00e9 et personnalis\u00e9 votre profil dans le pass\u00e9, il suffit d&rsquo;ajouter mon script vers le bas de votre fichier de profil.<\/p>\n<p>[pastacode lang=\u00a0\u00bbbash\u00a0\u00bb message=\u00a0\u00bb\u00a0\u00bb highlight=\u00a0\u00bb\u00a0\u00bb provider=\u00a0\u00bbmanual\u00a0\u00bb]<\/p>\n<pre><code>## ADDS A Connect-ConfigMgr ITEM TO THE ISE ADD-ONS MENU ##\r\n## Created by Matt Shadbolt - http:\/\/blogs.technet.com\/b\/ConfigMgrDogs ##\r\n\r\nFunction Connect-ConfigMgr {\r\n\r\n$CustomError = $null \r\n\r\nIf ($Console64 = Get-ItemProperty -Path HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\ConfigMgr10\\Setup -Name ProductCode -ErrorAction SilentlyContinue) {\r\n    \r\n    # 64-bit system\r\n    $ModulePath = (Get-ItemProperty HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\ConfigMgr10\\Setup -Name &#34;UI Installation Directory&#34;).&#039;UI Installation Directory&#039;\r\n    $SiteServerName = (Get-ItemProperty HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\ConfigMgr10\\AdminUI\\Connection -Name Server).Server \r\n    $ProviderLocation = gcim -ComputerName $SiteServerName -Namespace root\\sms SMS_ProviderLocation -filter &#34;ProviderForLocalSite=&#039;True&#039;&#34;\r\n    $ProviderMachine = $ProviderLocation.Machine\r\n    $SiteCode = $ProviderLocation.SiteCode\r\n    Import-Module $ModulePath\\bin\\ConfigurationManager.psd1\r\n    Set-Location $SiteCode&#34;:\\&#34; \r\n    }\r\n\r\nElseIf ($Console32 = Get-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\ConfigMgr10\\Setup -Name ProductCode -ErrorAction SilentlyContinue) {\r\n    \r\n    # 32-bit system\r\n    $ModulePath = (Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\ConfigMgr10\\Setup -Name &#34;UI Installation Directory&#34;).&#039;UI Installation Directory&#039;\r\n    $SiteServerName = (Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\ConfigMgr10\\AdminUI\\Connection -Name Server).Server \r\n    $ProviderLocation = gcim -ComputerName $SiteServerName -Namespace root\\sms SMS_ProviderLocation -filter &#34;ProviderForLocalSite=&#039;True&#039;&#34;\r\n    $ProviderMachine = $ProviderLocation.Machine\r\n    $SiteCode = $ProviderLocation.SiteCode\r\n    Import-Module $ModulePath\\bin\\ConfigurationManager.psd1\r\n    Set-Location $SiteCode&#34;:\\&#34; \r\n\r\n    }\r\n\r\nElse { \r\n    $CustomError = [String]&#34;Error: The required registry keys cannot be found. Please ensure the console has been installed on this computer&#34; \r\n    Throw $CustomError\r\n    }\r\n}\r\n\r\n$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add(&#34;Connect-ConfigMgr&#34;, \r\n{\r\n    Connect-ConfigMgr\r\n},&#34;ALT+F1&#34;) | out-Null\r\n<\/code><\/pre>\n<p>[\/pastacode]<\/p>\n<p>Enregistrez le fichier et ouvrir ISE.\u00a0 Vous avez maintenant une option Connect-ConfigMgr dans le menu Add-Ons.\u00a0 Vous pouvez soit s\u00e9lectionner cette option, ou appuyez simplement sur Alt + F1 de ISE et votre console se connecte \u00e0 votre console SMS.<\/p>\n<p><a href=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-588 aligncenter\" src=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE3-300x170.jpg\" alt=\"powershellISE3\" width=\"300\" height=\"170\" srcset=\"https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE3-300x170.jpg 300w, https:\/\/les2t.fr\/wp-content\/uploads\/2015\/01\/powershellISE3.jpg 537w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>L\u2019auteur du Script (Matt Shadbolt) l&rsquo;a d\u00e9pos\u00e9 sur la galerie Technet : <a href=\"https:\/\/gallery.technet.microsoft.com\/PowerShell-ISE-Add-On-to-4790e37b\" target=\"_blank\">ICI<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Je vous pr\u00e9sente aujourd\u2019hui un moyen rapide de charger le module ConfigMgr PowerShell dans la console PowerShell ISE.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[59,7],"tags":[14,36,171,76,164,22],"class_list":["post-587","post","type-post","status-publish","format-standard","hentry","category-powershell","category-sccm-2012","tag-configmgr-2012","tag-microsoft","tag-powershell","tag-powershell-ise","tag-sccm-2012","tag-system-center-configuration-manager"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SCCM 2012 \u2013 Powershell ISE Add-Ons de connection - Les2T<\/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:\/\/les2t.fr\/fr_fr\/sccm-2012-powershell-ise-add-ons-de-connection\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection - Les2T\" \/>\n<meta property=\"og:description\" content=\"Je vous pr\u00e9sente aujourd\u2019hui un moyen rapide de charger le module ConfigMgr PowerShell dans la console PowerShell ISE.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/les2t.fr\/fr_fr\/sccm-2012-powershell-ise-add-ons-de-connection\/\" \/>\n<meta property=\"og:site_name\" content=\"Les2T\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-06T08:40:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg\" \/>\n<meta name=\"author\" content=\"TRARBACH Jean-Yves\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"TRARBACH Jean-Yves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/\",\"url\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/\",\"name\":\"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection - Les2T\",\"isPartOf\":{\"@id\":\"https:\/\/les2t.fr\/fr_fr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg\",\"datePublished\":\"2015-01-06T08:40:38+00:00\",\"author\":{\"@id\":\"https:\/\/les2t.fr\/fr_fr\/#\/schema\/person\/d96bb4f512f9aeb12dc923def245768e\"},\"breadcrumb\":{\"@id\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#primaryimage\",\"url\":\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg\",\"contentUrl\":\"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/les2t.fr\/fr_fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/les2t.fr\/fr_fr\/#website\",\"url\":\"https:\/\/les2t.fr\/fr_fr\/\",\"name\":\"Les2T\",\"description\":\"| BLOG  IT |\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/les2t.fr\/fr_fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/les2t.fr\/fr_fr\/#\/schema\/person\/d96bb4f512f9aeb12dc923def245768e\",\"name\":\"TRARBACH Jean-Yves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/les2t.fr\/fr_fr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/les2t.fr\/wp-content\/uploads\/2023\/02\/JeanYvestrarbach-96x96.jpg\",\"contentUrl\":\"https:\/\/les2t.fr\/wp-content\/uploads\/2023\/02\/JeanYvestrarbach-96x96.jpg\",\"caption\":\"TRARBACH Jean-Yves\"},\"description\":\"Head Of Modern Workplace Metsys MVP Windows &amp; devices For IT\",\"sameAs\":[\"https:\/\/les2t.fr\/jean-yves-trarbach\/\"],\"url\":\"https:\/\/les2t.fr\/fr_fr\/author\/kounac\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection - Les2T","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:\/\/les2t.fr\/fr_fr\/sccm-2012-powershell-ise-add-ons-de-connection\/","og_locale":"fr_FR","og_type":"article","og_title":"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection - Les2T","og_description":"Je vous pr\u00e9sente aujourd\u2019hui un moyen rapide de charger le module ConfigMgr PowerShell dans la console PowerShell ISE.","og_url":"https:\/\/les2t.fr\/fr_fr\/sccm-2012-powershell-ise-add-ons-de-connection\/","og_site_name":"Les2T","article_published_time":"2015-01-06T08:40:38+00:00","og_image":[{"url":"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg","type":"","width":"","height":""}],"author":"TRARBACH Jean-Yves","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"TRARBACH Jean-Yves","Dur\u00e9e de lecture estim\u00e9e":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/","url":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/","name":"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection - Les2T","isPartOf":{"@id":"https:\/\/les2t.fr\/fr_fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#primaryimage"},"image":{"@id":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#primaryimage"},"thumbnailUrl":"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg","datePublished":"2015-01-06T08:40:38+00:00","author":{"@id":"https:\/\/les2t.fr\/fr_fr\/#\/schema\/person\/d96bb4f512f9aeb12dc923def245768e"},"breadcrumb":{"@id":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#primaryimage","url":"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg","contentUrl":"https:\/\/les2t.fr\/wp-content\/uploads\/2014\/09\/sccm2012-300x159.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/les2t.fr\/en_us\/sccm-2012-powershell-ise-add-ons-de-connection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/les2t.fr\/fr_fr\/"},{"@type":"ListItem","position":2,"name":"SCCM 2012 \u2013 Powershell ISE Add-Ons de connection"}]},{"@type":"WebSite","@id":"https:\/\/les2t.fr\/fr_fr\/#website","url":"https:\/\/les2t.fr\/fr_fr\/","name":"Les2T","description":"| BLOG  IT |","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/les2t.fr\/fr_fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/les2t.fr\/fr_fr\/#\/schema\/person\/d96bb4f512f9aeb12dc923def245768e","name":"TRARBACH Jean-Yves","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/les2t.fr\/fr_fr\/#\/schema\/person\/image\/","url":"https:\/\/les2t.fr\/wp-content\/uploads\/2023\/02\/JeanYvestrarbach-96x96.jpg","contentUrl":"https:\/\/les2t.fr\/wp-content\/uploads\/2023\/02\/JeanYvestrarbach-96x96.jpg","caption":"TRARBACH Jean-Yves"},"description":"Head Of Modern Workplace Metsys MVP Windows &amp; devices For IT","sameAs":["https:\/\/les2t.fr\/jean-yves-trarbach\/"],"url":"https:\/\/les2t.fr\/fr_fr\/author\/kounac\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/posts\/587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/comments?post=587"}],"version-history":[{"count":0,"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/posts\/587\/revisions"}],"wp:attachment":[{"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/media?parent=587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/categories?post=587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/les2t.fr\/fr_fr\/wp-json\/wp\/v2\/tags?post=587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}