How do I add a PowerShell cmdlet or function to my machine so that it is always available?

前端 未结 2 1316
萌比男神i
萌比男神i 2021-02-19 02:04

If I find (or create) a new PowerShell cmdlet (or function), how do I add it to my machine?

  • Do I copy it to a particular folder?
  • Do I put its content in a
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-19 02:59

    You should access the cmdlets through your profile script. That way, every time you access PowerShell, it gets loaded. See The Power of Profiles.

提交回复
热议问题