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!

有帮助吗?

解决方案

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/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top