PowerShell script template

This topic contains 4 replies, has 5 voices, and was last updated by Profile photo of April April 1 month ago.

  • Author
  • #73349
    Profile photo of z442a9

    Does anyone know a good PS template that can be used as a starting point for new PowerShell scripts

  • #73351
    Profile photo of Chris

    Hi Z44,

    I wouldn't really imagine there is such a thing? Powershell scripts are made to order, once they are created they stay that way and are mostly turned into autonomous pieces of code, tweaked here and there to suit requirements.

    Do you have an idea on what you want the powershell script to do?

  • #73375
    Profile photo of Ivan

    Like Chris said, I don't think a PS template is practical, maybe a very simple one including generic Inline Help and an empty function could be it, but that could be done with a quick copy-paste.

  • #73393
    Profile photo of Ben Camareno
    Ben Camareno

    In PowerShell ISE hit Ctrl+J and you get a list of snippets. That's a good starting point to start creating basic and advanced functions or to create Workflows.
    Here's a good article by the scripting guy.
    Powershell Snippets

    Hope this helps.

    • #73409
      Profile photo of April

      thanks , it is helpful

You must be logged in to reply to this topic.