Top "Cmdlet" questions

A cmdlet is a lightweight Windows PowerShell script that performs a single function.

LiteralPath option for cmdlet

In most example that I see in tutorials and books, the -LiteralPath option is almost never used by default (the …

powershell powershell-2.0 cmdlet
PowerShell Snapin Cmdlet CommandNotFoundException

Currently I'm trying to create my first PowerShell Snapin. I followed this tutorial: How to create a PowerShell Snapin and …

powershell cmdlets cmdlet snap-in pssnapin
Start-Job script block-- how to call cmdlets with arguments?

I'm new to the Start-Job cmdlet and am having trouble calling a script block with cmdlets in it that take …

powershell arguments cmdlet start-job
PowerShell: Import-Module, but no "ExportedCommands" available

When I use Import-Module -Name <path_to_local_dll> -Verbose the cmdlets contained in the DLL file are …

powershell cmdlet import-module
Powershell Cmdlet with Mandatory Parameters

I'm trying to create a simple powershell cmdlet that would have a few mandatory parameters. I've found the following code …

powershell parameters cmdlet
Interesting trouble with windows services and the Stop-Process cmdlet

We have a few home-brewed windows services over here. One of them is problematic, in that it won't always stop …

powershell process windows-services cmdlet
The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet

I have a solution with two project, one is the main project and the second a project that will use …

entity-framework visual-studio cmdlet
How to write a PowerShell CmdLet that will accept a parameter of type System.Type?

I want to pass a Type to a custom CmdLet, as follows: PS> "1" | My-CmdLet -Check [System.String] I want …

powershell types parameters parameter-passing cmdlet
Powershell scripting: recommended way to implement ShouldProcess when function calls are nested?

Test script: function outer { [cmdletbinding(supportsshouldprocess=$true)] param($s) process { $pscmdlet.shouldprocess("outer $s", "ShouldProcess") | out-null "" | out-file "outer $s" inner …

design-patterns powershell error-handling cmdlet