Python interestee since summer '18.
Curious about any useful criticism!
-
NNIT A/S
- Czech Republic, Prague
Block or Report
Block or report DigitalAXPP
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
1
# PowerShell testing in C#
23PowerShell cmdlets can be written in C# by inheriting either form the `Cmdlet` class or the `PSCmdlet` class. In short, the difference between both classes are the level of dependence to the PowerShell runspace. The `Cmdlet`-class is less tighly coupled to the PowerShell runspace, than the `PSCmdlet` class. A more in-depth comparison between both classes can be found [here](https://weblogs.asp.net/shahar/cmdlet-vs-pscmslet-windows-powershell).
45One important difference between both classes are the requirements for automated testing. The `Cmdlet` class can be easily invoked in C#, while the `PSCmdlet` class requires to be run in a PowerShell runspace. A great description about the two testing variations can be found in the course by Nathan Honeycutt "[PowerShell Cmdlet Development in C# - The Ins and Outs](https://www.pluralsight.com/courses/powershell-cmdlet-development-csharp)".