I know that Powershell is generally considered the IT management language for windows, but why/when would you choose F# instead, which is strongly typed and 'intellisensed' ?
We basically distinguish between 3 different types of tasks: Incidential tasks. Coordinated tasks. Planned tasks.
1. Task is a term used to describe a software program or section of a program that is running in a multitasking environment. Tasks help the user and computer identify between each of the programs running on the computer. Microsoft Windows users can view currently running tasks using Task Manager.
By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s. Specifies the password of the user account specified in the /u parameter.
Task management is the practice of tracking a task through to completion. Most people do some type of task management, without thinking about it, every day. Even making your morning coffee requires you to break down a larger project (“make coffee”) into smaller steps (“grind coffee,” “change filter,” etc).
I'd choose F# when it was a better fit for the company I was working for, the team who'll be using it, and the task at hand. Otherwise I'd choose something else.
I can't be more specific than that without more details, but I can suggest a few questions you should ask:
A related hint: don't allow a profusion of languages to develop in your production code and infrastructure.
By all means experiment to find the best language to solve the problem you're having, but if you find in five years time that someone has written a core component of your solution in a language that is no longer understood by anyone in the company, you may have a serious problem on your hands.
My personal rule of thumb (of course there are exceptions) is that a project should have a core language and a scripting language to hold it all together, & that those languages should be chosen first to fit the problem domain, and secondly to maximise proficiency across the team. 'Pet languages' should be strongly discouraged in production code or infrastructure.
It depends on your problem and on who will maintain the scripts.
PowerShell is very strong in administration areas (working with files, active directory, csv/xml, computers, etc.), but it's programming abilities are quite limited (e.g. case of generics). Threading in PowerShell is not as easy as it could be. But nobody expects from administrators that they will use threads. Instead there are background jobs that satifisfy administrator's needs.
On the other hand, F# is real programming language, which means it is quite low level and therefore verbose (compared to PowerShell). Some tasks written in PowerShell are one-liners, whereas in F# you would write a lot of code. Besides that - how would you achieve running command on remote computers (Invoke-Command -computer myserver ...
)?
As you see, it depends on your problem.
Very important is also who will maintain the scripts. You might be on holiday and your colleagues will need to edit the scripts. Both languages need some time to learn. IMHO it is easier to learn PowerShell; thinking in functional style needs to bend your head.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With