Skip navigation
rows of lavender leading to trees

Q. Is there such a thing as a "script cmdlet" in PowerShell?

Q. Is there such a thing as a "script cmdlet" in PowerShell?

A. Sort of. That is, you can write something called an advanced function that duplicates much of the behavior of a cmdlet and is written entirely in script. In PowerShell, run

help about_functions_adv*

to see a list of related help topics. You can also see my blog post "Advanced Functions Part 1: Cmdlets From Scripts" and "Advanced Functions Part 2: ShouldProcess() in Your Script Cmdlets" for more information.

Do you have a Windows PowerShell question? Find more PowerShell FAQs, articles, and other resources at windowsitpro.com/go/DonJonesPowerShell.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish