9 ms·
Please give us something that doesn't require PowerShell, since PowerShell never just works. Just look at the ridiculous bullshit that you have to deal with whe
by WorldWideWayne 11y ago
Please give us something that doesn't require PowerShell, since PowerShell never just works. Just look at the ridiculous bullshit that you have to deal with when you want to use Chocolatey (from the Chocolatey install guide):
Note: You must have your execution policy set to unrestricted (or at least in bypass) for this to work (Set-ExecutionPolicy Unrestricted). There have been reports that RemoteSigned is enough for the install to work.
- Aleman360 11y agoPowerShell is disabled by default for security reasons. It's one command to enable it.
- WorldWideWayne 11y agoYeah, one command - on every machine... Meanwhile on Linux, I don't need to do any special configuration to run scripts.
- dragonwriter 11y ago> Yeah, one command - on every machine... I think Microsoft envisions centrally-managed environments, rather than those with lots of Windows machines that aren't centrally managed.
- theg2 11y agoYou do if those scripts can affect the system and need to run as root. Powershell is incredibly powerful (and dangerous) and some security isn't the worst thing.
- swasheck 11y agothe irony of this is that if ms were to leave powershell open to run any scripts from anywhere at any time, they'd be ridiculed for lax security policies.
- mmcru 11y agowhy? .cmd and .bat can run any time, and can do just as much damage as powershell.
- astrodust 11y agoIt's no more powerful and dangerous than bash in the right hands.
- dragontamer 11y ago> on every machine... Or through one group policy pushed to every machine.
- Someone1234 11y agoPlus, unlike what most people envision on here, Microsoft intends companies to push AllSigned or RemoteSigned, rather than Unrestricted. So the company can push their CA and new PS policy in a single GPO, and then all internal PS scripts are signed using an internal CA generated code signing certificate. This sounds complex but it is actually as simple as running Set-AuthenticodeSignature on each script using the code signing certificate.
- useerup 11y ago> PowerShell is disabled by default for security reasons. Small correction: PowerShell script files are disabled by default for security reasons. PowerShell is available with all Windows versions since Vista SP1. On the latest Windows versions, remote command (part of Remote Management) is enabled by default. I.e. you can connect (given proper credentials) to a Server 2012R2 through PowerShell remoting and execute commands. Indeed, the new "Server Nano" will not have any way to log in locally at all. There is no shell (as in operating system shell), and no local editor (like notepad). Only the remote command interface. PowerShell will be extended to allow remote file editing - i.e. use a local editor for a file residing on the remote computer (been missing that for the longest time now)
- MichaelGG 11y agoYeah MS was burned by scripting in the past (vbs attachments). So now they ship their new server scripting system... disabled by default. Same type of reasoning that leads them to not include a telnet client. Or makes you twice opt in to compression to make IIS actually gzip "dynamic content". It's a noble idea, done more in a CYA kind of way, it feels.
- bkeroack 11y ago> PowerShell never just works. That statement is a bit much. I agree the default execution policy is annoying, but can you blame MS for being a little overzealous given their history? Some aspects of Powershell are actually pretty nice. Ever want to use a real hashmap in bash for example? Or easy JSON construction/manipulation without hacks like jq? PS has all that.
- integraton 11y ago> Ever want to... That's because Bash is used to tie together separate programs that do the work. PowerShell, on the other hand, is a .NET shell and more equivalent to the shells in Python, Node, Ruby, the JVM, etc, all of which provide ways to work with JSON and many different data structures.
- skrebbel 11y agoSo?
- seanp2k2 11y agoSo it's not unique to Windows and other things have been doing this for much longer on different platforms with more users and now have much larger ecosystems making it easier to do what you want quickly.
- wtallis 11y agoIf you want to do advanced stuff in your scripts, you've never been limited on unix systems to just sh or bash, but on Windows you still don't have a good shell for interactive use.
- Someone1234 11y agoPowerShell ISE is pretty nice. I use it as my main shell.
- SomeStupidPoint 11y ago
- seanp2k2 11y agoIt's like they wanted sudo and user accounts with arbitrary permissions but had no idea how to do that, so they did UAC and this stuff instead.
- viccuad 11y agohow was the saying, "Those who do not understand UNIX are condemned to reinvent it, poorly"..
- Aloha 11y agoWindows has an analogy to sudo, called runas UAC is designed to solve a different problem, users on Windows historically ran as administrator, and much legacy software requires it, UAC is designed to provide an apparent administrator environment to the software but catch what the software is using, and give the user a chance to approve privilege escalation.
- antod 11y agorunas is more of a su analogy than a sudo one.
- Aloha 11y agoI disagree, the -u option for sudo gives you nearly identical functionality.
- antod 11y agoThe reason su is a better runas analogy than sudo is that it has a similar scope and similar purpose. While it does overlap su/runas functionality, sudo has a much larger superset of features and policy configuration that su and runas simply don't have.
- kuma4 11y agoBash is oudated. PowerShell is new.