header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Adding cmdlets ?
Last Post 20 Aug 2008 06:44 PM by marco.shaw. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
SoCalDaveLUser is Offline
New Member
New Member
Posts:19
Avatar

--
20 Aug 2008 05:17 PM  

This is probably 'Powershell 101' but I've heard/read where you can use cmdlets that aren't necessarily part of the core Powershell installation  to do specific tasks (ie. get-vmguest).

My question is... how do you add these cmdlets to Powershell? 

Is it as part of the vmware installation?  are they just specific files that you refer to?  I'm missing the basic point of that.

thanks,

 

(note: Yes HAL, I'm referring to the cmdlet you mentioned in episode #36 of the podcast)

^^^^^^^^^^^^^^^^^^^^
"Sometimes I feel like I'm full of I.T."
Twitter = SoCalDaveL
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:188
Avatar

--
20 Aug 2008 05:22 PM  
Go get the VI Toolkit for Windows to start with:
http://www.vmware.com/download/sdk/
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:334
Avatar

--
20 Aug 2008 06:24 PM  
In version 1 of PowerShell, new cmdlets come part of a packaged "snapin". You list installed ones with get-pssnapin, and you add them to your current session with add-pssnapin. A snapin is a .DLL, and it has to be installed using a certain .NET tool called installutil. Luckily, this part of the process is rarely shown to the end user, instead an installer package will do that part (as with the VMware ones Marco mentioned).

PowerShell in fact comes with a core set of snapins, as you'll see when you type get-pssnapin.

In version 2, there will be additional methods to distribute cmdlets in both a script and binary form.
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:188
Avatar

--
20 Aug 2008 06:44 PM  
The gory details of manually loading a DLL:
http://marcoshaw.blogspot.com/2007/09/howto-invoking-cmdlets-within-cmdlet_24.html

Sorry, I was a bit brief on my reply.
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer