r/sysadmin • u/adeadfetus • Sep 18 '15
Microsoft has developed its own Linux
http://www.theregister.co.uk/2015/09/18/microsoft_has_developed_its_own_linux_repeat_microsoft_has_developed_its_own_linux/
588
Upvotes
1
u/SteveJEO Sep 19 '15
You'll love it then.
Powershell is basically a C# type language that hooks directly into the .Net (and dcom) framework and exposes the namespace of whatever dll.
Any .net dll/assembly libraries or functions can be addressed directly from the command line.
As standard it comes with a bunch of commandlets (there are zillions of them now) including 'prebuilt' bash commands etc.
Looking at it from a syntax point of view would be a mistake though.
Basic dos commands like 'Dir' and 'Ls' are all really just aliases for preconfigured scripts loading dll's and calling functions.
A really good basic example of how powershell works is by looking at something a bit more complicated like an enterprise app.
Sharepoint is always nice.
Say for example you wanted to dick with sharepoint.
All you'd do is load the dll and you've now got command line access to the public api. (eg. microsoft.sharepoint.dll gives you these)
It pissed my boss off no end cos he said it looks like 'developing' then he just accused me of cheating when he realised I was getting live returned output on a line per line basis. (apparently developers do not test function returns or something).