Earlier quoted context omitted.
I just hope it's not in the PowerShell zeitgeist of `--Super_Long_Option_Names_that_Use_a_Mix_Of_Caps_And_things`
PowerShell options are all single dash, tab completable, case insensitive, will match on the shortest unique prefix, and can be aliased with shorter ones like `-EA` is `-ErrorAction, and are consistent because the shell parses them not the cmdlet.
Sudo for Windows
421–430 of 439 posts
Re: Sudo for Windows
#422Earlier quoted context omitted.
> "cat *.txt" is a pattern I see being used everywhere. That's an astonishing claim to make without evidence. I don't see "cat *" being used anywhere. In fact, I've just ran search for usage of "cat" over the repository of shell scripts that are used for the various packaging and deployment tasks in my company (and we have to deploy a lot of stuff, written in different programming languages, and every team packages t…
The onus isn't on me to disprove that 99% of cat users don't care about concatenation, but here's a non-comprehensive list of projects using cat to concatenate files: OpenSSL, Curl, Git, Linux, Gettext, NodeJS, zstd, GCC, FFmpeg, OpenJDK, Pyenv I think users, upstream developers, and downstream packagers of these software will all be upset if cat ceased to concatenate. Example: https://sourcegraph.com/search?q=contex…
Re: Sudo for Windows
#423Earlier quoted context omitted.
I have noticed that runas is mentioned as an already existing sudo alternative, but as far as I know, runas asks you for the administrator's password. sudo asks the own user password. This is how you give a non administrator user the right to use some application/tool without revealing the admin's password. Or does runas work differently than I thought?
You're right, but on my work environment I have two accounts - "me" and "me with elevated permissions". (I don't say "admin" because there's still a bunch of stuff I can't do, like run netsh). I assumed that was the normal pattern in Windows-land?
Re: Sudo for Windows
#424Yep, it's really happening. Sudo is coming to Windows. It's obviously not just a fork of the linux sudo - there's enough that's different about the permissions structure between OS's that just a straight port wouldn't make sense. But the dream of being able to run commands as admin, in the same terminal window - that's the experience we're finally bringing to users. I've been working on this for the last few months n…
It seems interesting to me that Windows integrates more and more elements of Unix. Linux is open source and free, Apple develop an OS that sells specific hardware, and historically Windows has sold the software for generic hardware. Windows is unlikely to become a better Linux than Linux. Where is Microsoft's new business model going? Historically Office was a money maker, but Office online is a shambles and many use…
"Microsoft revenue was $198 billion in 2022, up $30.2bn (+18%) from a year earlier. When we do a breakdown by product streams, the largest source of Microsoft’s revenue was Office, with $44.9 billion (23% of the total). Just behind in the second place was Azure with $44bn of revenue (22% of total)." - https://www.kamilfranek.com/microsoft-revenue-breakdown/
Office alone increasing by $5Bn revenue in a year, increasing by $24Bn in ~3 years, being the largest chunk of revenue of the most valuable market-cap company on the planet, that's what counts as "slowly dying"??
Re: Sudo for Windows
#425Earlier quoted context omitted.
Apparently, because you can't seriously be asking that question. You've clearly never worked in any kind of customer support position, because businesses and individuals need all kinds of help with a transition like that.
>Apparently, because you can't seriously be asking that question. YEs I was asking seriously. You still haven't explained what those challenges could be. All you do is mock people for their genuine questions without providing any actual answers/information to back up your vage statements. >You've clearly never worked in any kind of customer support position Then if that's clear for you I haven't never done that, why…
Many small and medium companies don't have any internal IT. Maybe the original parent commentor works for an MSP / outsourced IT services provider / as an IT consultant.
> "What could be so complicated that"
Windows 11 has hardware requirements that Windows 10 didn't, their equipment may need to be reviewed/audited or refreshed - planned, budgetted, quoted, ordered, received, checked, configured, user data migrated over for dozens of devices. Business customers need to buy Windows Pro not Windows Home - and need enough IT experience to know that, non-technical companies may have bought some Windows 11, had problems, and needed to call someone for help. A company might have some internal IT who could do it, but are busy with other projects and don't have time to plan and execute an upgrade. Windows 11 comes with new Group Policy templates which need importing to a Windows domain and configuring - and may need reviewing or auditing for regulatory compliance to see what needs setting up and the parent commentor is some kind of compliance person helping with paperwork instead of a technical person. A company might take an upgrade to Windows 11 as a time to change other things like a move to Microsoft Cloud Services (OneDrive, Microsoft account for login) and each user needs to be given a new laptop and have all their settings moved over. A company might have specialist software from vendors who aren't very progressive - e.g. optician's software which manages retina scanning cameras - and needs lots of time consuming hand holding with the vendor support line before the vendor will agree to the move, even if it would in principle work fine. Regardless of technical issues, the upgrade could take an hour or two per machine, over dozens or hundreds of machines, that's either a big interruption which needs planning (staged rollout for different departments, say) or needs some automated way to deploy it which needs setting up, testing, and checking on, and may just hire some temporary contractors for more people to do that. There may be users who could do it, but won't because it isn't their job, or aren't allowed to by their manager or union so it isn't their responsibility if it goes wrong.
Re: Sudo for Windows
#426Earlier quoted context omitted.
At least it doesn't let you do this (as far as I can tell) so it seems slightly better in that aspect: value="1 -o 1" if [ $value -eq 10 ]; then echo "Value is exactly 10." fi The syntax is terrible, though – if these operators are not actually options for a command, which is the context where the leading dash makes some kind of sense, why make them look like that? Also, why does the documentation[0] talk about state…
What else would the operators be? They can't use `>` because that does IO redirection, they can't use `|` for OR because that's piping. They could use `==` for equality but then what symbols would -ceq and -ieq be? What symbols or what else would work for `-match` and `-in` and `-cmatch`? If they were just `eq` or did use `==` how would that work for when they are actually options to a cmdlet such as `| where-object…
I also don't even like their verb-noun philosophy because it's impossible to figure out what the commands are and there are so many. It's still all objects and methods underneath but you can't auto-complete anything.
Re: Sudo for Windows
#427Re: Sudo for Windows
#428 * asadmin
* admindo
* adminrun
* admrun
* elevate
* privelevRe: Sudo for Windows
#429Earlier quoted context omitted.
Is there anything shorter than `powershell.exe -executionpolicy unrestricted -file`? powershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages setup_windows.ps1: https://github.com/westurner/dotfiles/blob/develop/scripts/s...
powershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages powershell -ex bypass -f ./setup_windows.ps1 -I -UpdateW -UpdateC (or whatever are short enough to uniquely identify parameter names for your script)
Re: Sudo for Windows
#430I already use https://github.com/lukesampson/psutils which has a sudo.ps1, which I install via scoop (I know that's a mouthful, but I just install scoop and run `scoop install sudo`). I used it from powershell literally just before I opened this article (after copy-pasting a password, I copy some random text laying around in the browser, like "com", then run `sudo restart-service -name 'cbdhsvc*'` to clear the clipbo…
Mind that Windows has clipboard (win+v) history and you may've that enabled