PowerShell Internals Slideshow

  1. <?xml version="1.0"?> 
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
  3.     <CodeSnippet Format="1.0.0"
  4.         <Header> 
  5.             <Title>Load all available snap-ins</Title> 
  6.             <Shortcut /
  7.             <Description>loads all snap-ins that are registered (available) but not yet loaded</Description> 
  8.             <Author>Dr. Tobias Weltner http://www.powershell.de</Author> 
  9.             <SnippetTypes> 
  10.                 <SnippetType>Expansion</SnippetType> 
  11.             </SnippetTypes> 
  12.         </Header> 
  13.         <Snippet> 
  14.             <Code Language="PowerShell" Kind="3"><![CDATA[$available = Get-PSSnapin -Registered 
  15. $loaded = Get-PSSnapin | Where-Object { $_.isDefault -eq $FALSE
  16. Compare-Object $available $loaded | ForEach-Object { Add-PSSnapin  $_.InputObject.Name
  17. ]]></Code> 
  18.         </Snippet> 
  19.     </CodeSnippet> 
  20. </CodeSnippets> 
 
Loading...
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.