5 ms·
Lets not dive into details here. I know that Sql Server module sux (MS guys I worked with told me that Sql team didn't quite get it), especially when it automa
by majkinetor 8y ago
Lets not dive into details here.
I know that Sql Server module sux (MS guys I worked with told me that Sql team didn't quite get it), especially when it automatically changes drive to virtual one upon loading.
But it works, once you know the quirks, or you can find alternative (number of them).
> If you're on a Unixy machine, every tool implicitly runs from within a shell.
Run Windows Core or Nano server and you have the same thing.
Run X Windows and you have th same thing on Linux as on Windows.
> Either the powershell AD module, which is incomplete and doesn't cover the entirety of Active Directory, or you resort to the native .Net API which is ugly and unintuitive when used from a command line.
Many cmdlets are incomplete. Why do you think Linux CLI tools are complete ? Anyway, without any IDE and with just Notepad knowing a bit of .NET you could create yoru own functions where it isn't enough. I do it all the time, here is one link: https://github.com/majkinetor/posh https://github.com/majkinetor/posh
About ugliness, my God bash is ugly. The code is so ugly that it hurts. I don't even have to translate the C# code in Powershell if I don't want, I can just compile it and execute it from the string from Powershell. Dropping to .NET was never ment to be used on command line - wrap it into nice sugarry function/module.
> For an great concrete example, compare Cron with the Windows Task Scheduler.
Great example, because I like Cron and I hate WTS. The problem is the syntax - cron syntax is easy to learn and remember. WTS can't be specified that easyly, in any case you need to click, use XML, use ughly CLI tools, or incomplete Task Scheduler cmdlets. Also, WTS is full of quirks.
Yeah, typical way is 'here is exe, run it, thats it' or 'powershell -Command/-File' or 'cmd.exe -C ...' (as is with many other linux tools, cron excluded).
Its easy enough to create scripts, for instance this is my replacement for Startup folder:
https://github.com/majkinetor/posh/blob/master/MM_Admin/Register-LoginTask.ps1 https://github.com/majkinetor/posh/blob/master/MM_Admin/Regi...
But there is something more in line with your desires - PowerShell Scheduled Jobs (not Tasks, Jobs) which work as you want it - Powershell itslef manages scheduling.
- astine 8y ago"Run X Windows and you have the same thing on Linux as on Windows." No you don't. X Windows is still run from a shell. The Windows GUI, by contrast, is not. Any application run in Linux or Solaris or whatever can drop down to the shell. And if I run an application from a terminal, I can take advantage of that. Not so with Windows. "Anyway, without any IDE and with just Notepad knowing a bit of .NET you could create yoru own functions where it isn't enough." I've written PoSH modules before. I'm pretty familiar with the process. I don't know what point you're trying to make. "Why do you think Linux CLI tools are complete ?" Because in the Unix environment, the CLI tools have been the primary admin interface for the past 40+ years. In Linux, the CLI comes first and the GUI is an afterthought. In Windows, it's the other way around. If you think that's changing, great. But I work on Windows in my day to day work, and regularly write Powershell so I've got a good feel for the difference.