Question

I've downloaded a real nice cmdlet from this site, and would like to start using it. I'm having difficulty understanding the process, if someone could kindly give a general overview. I have the cmdlet already, i'm not sure if it needs further editing done. Next, I register it with Powershell? This is where i'm getting hung up, the tutorials i've found on this subject only mention using Visual Studio, which I don't have access to. Also, where does this physical cmdlet (.cs) file get placed? I think I will need some way to reference the system.management.automation.dll, at the very least. I've created a Powershell profile, and would like to use this as much as possible. Any other steps are much appreciated!

Was it helpful?

Solution

You can compile the code and output an assembly or even an load the cs file at run time using the Add-Type cmdlet, no VS necessary.

I wrote an article that shows how you can do that over at PowerShellMagazine.com.

http://www.powershellmagazine.com/2013/05/13/measuring-powershell-scripts/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top