how to create a cmdlet?
I have written my program in c# .net. I want to convert it in to a powershell cmdlet. I was instructed to use pssnapin and getproc programs. Can anyone plz help me out.. Regards Arun ...
I have written my program in c# .net. I want to convert it in to a powershell cmdlet. I was instructed to use pssnapin and getproc programs. Can anyone plz help me out.. Regards Arun ...
I'm new to PS so I may get some of the terminology wrong. If you want to roll out a custom PowerShell environment (snap-in) for a team of 30 developers/DBAs. What is the best way to do this... if you intend to be rolling out new functionality once a week? Does PowerShell 2.0 help in this regards? Assumption: There is no issue with eve...
I've got a really simple powershell script (see below). I've got installutil aliased using the following in my profile: set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil In powershell I simply: installutil assemplylocation.dll This returns successfully. (Install/Commit both complete successfully). Yet...
I have a c# app which executes rules, depending on an input. Some of the rules need to execute a poweshell script. I would assume that some of the scripts, as perhaps writtem by a user, would need a snapin to be available before they can execute correctly. I know I can add the snap in by doing something like this. RunspaceConfiguration...
I'm developing a custom PowerShell snap-in, which references another project in the solution. When I try to debug the snap-in (following [these instructions][1]), the assembly fails to load and my cmdlet fails with the message "Could not load file or Assembly..." How do you instruct PowerShell on how to locate assemblies, or how do yo...
I can see the 6 or so native PSSnapins, thanks to get-PSSnapin I have added the useful QAD snapins, thanks to add-PSSnapin My question is could you recommend any other useful third-party Snapins for PowerShell? ...
Library Project compiles fine for ANY CPU in VS2008 running on Win 7 64 -bit. Now in the post build following command fails when attemptiong to register library dll: PS C:\Windows\Microsoft.NET\Framework64\v2.0.50727> .\installutil C:\path\Project.dll Exception occurred while initializing the installation: System.BadImageFormatExcep...
I used this article to write my first own Powershell Cmdlet and Snapin. And it works fine. But I return a set of objects from my own data class, which has four properties and I want Powershell to display just one of these properties by default. So I used this part of the article to create this format file: <?xml version="1.0" encoding=...
I ran into an issue while using both the Vmware PowerCLI and System Center Virtual Machine Manager snap-ins for PowerShell. They both contain similarly named cmdlets, like 'Get-VM' and 'Get-VMHost'. It appears that the last snap-in to load wins, so I added logic in my script to load & un-load the snap-in when I needed to get either VMw...
I have a PowerShell snapin, and I would like to run a bit of initialization code (hooking some AppDomain events) each time my snapin is loaded (i.e. once for each powershell.exe process that is started). How can this be accomplished? ...