When to develop using Powershell vs C#?

前端 未结 3 1167
抹茶落季
抹茶落季 2021-01-01 23:15

I\'m just getting started in PowerShell and one of my sysadmins told me that Powershell can do as much as C# can for systems management, if not more.

Please forgive

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 23:42

    When I worked in the Windows build lab a LONG time ago (1997) the rule I was taught that if the code satisfies either of these two conditions write it in interpreted script, otherwise write it in compiled code:

    1. there's more overhead than code (using/include lines, function declaration, etc)
    2. there's a better than 10% chance that the code will change before it gets run again

提交回复
热议问题