Comments (11)
For Linux support we might want to Explore PowerShell Core
from tech-radar.
I've been having a bit of a play with it. It's a lot like working with .NET Standard. Main differences are:
- There's a different shell executable you have to install and use,
pwsh.exe
. - If you stick to standard cmdlets, you'll be fine.
- If you use anything that's Windows-specific, you're likely to hit a couple of issues:
- Things like registry access are more likely to result in permission problems. e.g.
dir hklm:
fails by default, thoughdir hkcu:
is fine.. - Your script won't work on non-Windows platforms. Kinda goes without saying, really.
- Things like registry access are more likely to result in permission problems. e.g.
- If you use any .NET types (e.g. via
New-Object
), you need to be careful to limit yourself to type in .NET Standard.
If you stick to the above rules, your scripts will probably work in both PowerShell and PowerShell Core. If you're deploying any scripts for customer to use, it's probably best to run automated tests under both powershell.exe
and pwsh.exe
.
from tech-radar.
Good question!
Since they seem to be the default, I guess Powershell cmdlets should be in Adopt.
Not so sure on "plain old commandline". My gut reaction is Endure.
Does raise questions regarding potential Linux support for things in future, maybe?
from tech-radar.
I do think whether we should be providing a plain commandline in addition to cmdlets is an interesting question, and not necessarily one I have strong feelings on.
Users seem to be all over the spectrum on this, with some enthusiastic about using PowerShell for all the things, and others needing help from Support to adapt simple worked examples.
from tech-radar.
I wonder if it's worth exploring going PowerShell first, and then provide a more limited command-line offering via a .cmd
script to expose basic use cases, rather than creating a full-blown console application? Might be nice to try this on something like SQL Clone.
from tech-radar.
If we're considering promoting PowerShell cmdlets, should we also be expressing guidance on script modules vs binary modules?
from tech-radar.
related issue we've just run into on Figleaf (where we currently have a plain commandline): how do we parse commandline options?
We have RedGate.Legacy.Commandline
(the old Shared.Utils implementation) currently in Endure, ideally moving to Retire at some point.
In the past we've used NDesk.Options
which seemed to work pretty well, although I don't know of any products which are actively using it now (since they've moved to/been replaced with powershell)
from tech-radar.
Sounds like we've got agreement on this. Are any teams in a position to explore PowerShell Core?
Adopt:
- PowerShell cmdlets
Explore
- PowerShell Core
Endure:
- Plain old command lines (we prefer PowerShell cmdlets for new stuff)
from tech-radar.
We're currently looking into building some masking cmdlets for Figleaf, so we can probably spend some time figuring out what Powershell Core is as well
from tech-radar.
I'm not sure how well binary PowerShell modules are supported under PowerShell Core. They were always a bit of a second-class citizen in PowerShell. We'd probably have to look into converting https://github.com/red-gate/RedGate.PowerShell to target .NET Standard.
from tech-radar.
Ah yes, I should have said we were building a binary module. (and we are also inheriting from RedGate.Powershell
since I've just been copying what our other products do)
from tech-radar.
Related Issues (20)
- [Tool] Docker HOT 1
- [Library] FsCheck
- [Tools] Adopt KeePass HOT 1
- [Techniques] Semantic Versioning 2.0.0 (SemVer) HOT 3
- [Tool] Renovate to update npm and nuget packages
- Rename category "Languages and frameworks" HOT 4
- Move JSON from "Tools" HOT 1
- [Libraries and Frameworks] Move JQuery to Endure
- [Techniques] Are "Trunk is always releasable" and "Continuous Delivery" worth keeping separate?
- [Techniques] Should the Show & Tell/Expo be on the tech radar?
- [Techniques] Remove "Scrum" HOT 3
- [Techniques] "Mobbing" HOT 7
- Rename "Adopt" to "Available" HOT 5
- Javascript Syntax highlighting library HOT 16
- BouncyCastle HOT 1
- SonarQube (especially PR Analysis) requires review HOT 3
- No mention of Entity Framework on the radar HOT 6
- GUI test technologies for WPF apps HOT 2
- Remove techniques quadrant HOT 2
- Blazor: Raise To Trial HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tech-radar.