Settings

Theme

Windows Management Framework V5 Preview

blogs.technet.com

126 points by petval 12 years ago · 64 comments

Reader

untog 12 years ago

Almost a meta comment, but Microsoft seems to be knocking their BUILD conference out of the park this year. I think we've already seen more notable announcements and improvements than we'll see at WWDC.

Just the fact that there was a talk about developing iOS apps by the founder of Xamarin is telling. The fact that he was wearing Google Glass is another...

NicoJuicy 12 years ago

This is actually pretty awesome. I liked package managers (using linux and Windows on dualboot), one of the best tools for Windows is Cygwin (using Linux commands in Windows).. Where i can automate a lot of (manual) work.

It seems to me that Microsoft is going all-in on open-source and flexibility.

If you are using Asp.Net, you should check out Owin and project Helios - http://blogs.msdn.com/b/webdev/archive/2014/02/18/introducin...

  • teh_klev 12 years ago

    If you use Cygwin a lot, you should check out MobaXTerm:

    http://mobaxterm.mobatek.net/

    The Pro edition is pretty sweet.

    • bbradley406 12 years ago

      At my school I frequently need to use Windows PCs, and having MobaXTerm on a flashdrive has been incredibly useful (installing Cygwin every time would be impractical). It is very powerful, and has a plugin system if you need some extra feature.

    • NicoJuicy 12 years ago

      I actually use cygwin a lot for stuff like ImageMagick, ssh key generation and wget (putty for terminals).

      I think mobaxterm would be overkill for me (but i bookmarked it either way :))

  • claar 12 years ago

    If you like Cygwin and Package Managers, checkout the wonderful Cyg-Apt: https://code.google.com/p/cyg-apt/

  • mattmanser 12 years ago

    /ranty

    Ahhh, Owin and Helios perhaps explain why the ASP.Net team are starting to feel like they are losing the plot.

    Trying to put any of their new stuff into existing projects is a complete nightmare. Their new features are inflexible and brittle. WebAPI feels alien. Routing is getting more and more complicated instead of simpler.

    And the new APIs just 'feel' wrong, as if they've been written by programmers who don't understand HTTP, javascript or the web. Programmers who haven't used apis on the web and know which ones are a joy to use and which ones are a nightmare. Programmers who don't seem to realize there a new javascript MVC hotness every week. Programmers who don't seem to understand that their javascript folders are never called '~/Scripts'. That 'S' still offends me.

    Everything has to be done just so, their way. It's not flexible at all, things break all over the place. They've decided to adopt the zealot interpretation of REST, which doesn't work. The OData implementation is hard to step into and feels half-finished.

    It's getting back to the bad old days where if you want to touch the pipeline at all ASP.Net gets angry and sulks in a corner. They're going back to their old 'MS knows best' model, where they can't trust programmers to choose their own (much, much better) practices. I wouldn't be surprised if they soon decide to start calling spans labels again because after all isn't that much clearer?

    And it turns out it's because they've just given up on existing code base. Never a good sign.

    I really just want ASP.Net Membership fixed to be super simple and not overengineered, the Request object to be fixed so I can get at the raw request when I need to without jumping through pre-generic collections, the cruft associated with the webform pipeline nuked and for no-one to ever, ever mention WCF to me ever again.

    Oh and for-the-love-of-god stop trying to force a shitty URL/API structure down my throat and hiding the routing in totally different files.

    I love C#, I am starting to seriously hate ASP.Net again. MVC 1 freed us, every subsequent release of MVC seems to smother, not liberate.

    • shanselman 12 years ago

      MVC5 uses AttributeRouting. Just put the routing on the controllers. No need for a routing table. (or routes.rb ;) )

      ASP.Net Identity 2 is just that, easy and extensible membership.

      Owin requests also give you what you're asking for also.

      Don't like the S, change it? lowercaseroutes=true.

      ;)

      Oh, and just to be snarky, the "programmers who don't understand HTTP" were lead by Henrik Nielsen, author of the HTTP spec, used to work for Tim Berners-Lee. ;)

      • NicoJuicy 12 years ago

        Scott, while you here, can i get your opinion on OData and the future? You probably have some insights i'm not aware of.

        (noticed some changes on their website recently)

        I wanted to use it to implement my API, but i got kinda "scared" knowing that Netflix changed from OData to something else. Any examples of popular API's using OData for example?

        • shanselman 12 years ago

          OData, to me, makes sense for data that has a dynamic schematic and/or a client that wants to explore or wander the data in the way an intranet or analyst does. Like Excel folks might. Not the way a phone app or desktop app might. Great for a certain kind of app.

          For narrower apps, I'd make a web api but consider using just the OData query string formats (filter, sort) for flexibility.

          • NicoJuicy 12 years ago

            In short:

            Internal API = OData (= data layer)

            External API = WebAPI with OData methods (=service layer, which brings the endpoint data to 3rd parties)

            And because it's an internal API, it's a reason why you don't see it a lot in public API's (SAP uses it intensively though)

            Thanks :)

      • romaniv 12 years ago

        ASP.Net Identity 2 is just that, easy and extensible membership.

        I don't know about easy, but it definitely doesn't look simple, judging by examples.

        http://blog.iteedee.com/2014/03/asp-net-identity-2-0-cookie-...

        There are a lot of abstractions that don't represent anything outside of the framework itself, and a lot of components that interact in non-obvious ways. Also, it seems like finding integration points requires quite a bit of knowledge about how Identity 2 works.

        The fact that there doesn't seem to be a coherent set of definitive/official documentation describing what and how it works doesn't help either.

      • mattmanser 12 years ago

        Ach, I just needed to release a pressure valve. I think I'm mentally getting ready to abandon ASP.Net soon in all honesty, it's such a mess.

        And just because you can make a car doesn't make you a great race-driver ;)

        EDIT: WTF is going on with downvotes this week? If you don't agree with me, reply, don't down-vote.

        A spec designer of HTML, which no sane person can claim isn't riddled with bad design decisions, is not magically a great programmer too

        • angrybits 12 years ago

          The thing I had to realize is that there is no web framework that I will like everything about. It sounds like such a simple statement, yet it took me a long time to come to grips with it. So find the one that you can "think in" and build your code in it. For me, I recently dusted off PHP. I'm currently building a product in with no framework or ORM, and I am honestly more productive than I have been in a long time--which probably says more about me than I care to admit. The point is, it's the framework that gives me the least resistance to accomplishing what I want to accomplish. If MVC isn't your framework, then switch, but just do it knowing that your new home will have just as many warts as your existing one has. The devil you know is often much easier to deal with than the devil you don't.

          • shanselman 12 years ago

            Exactly, use the one that makes you happy. Use the one the feeds your spirit. Use the one that allows you to wake up in the morning, and keep working. And ignore the haters.

        • Locke1689 12 years ago

          If you don't agree with me, reply, don't down-vote.

          With an account that old you should know better -- downvotes are perfectly fine for disagreement. This is not Reddit.

          • mattmanser 12 years ago

            No they're not. With an account that old you should know downvotes have never been about disagreement. It's a new phenomenon which seems to have been happening alarming rapidly over the last few months.

            Maybe we're just from different timezones.

        • danford 12 years ago

          >down votes

          It's because of what you said about ASP.NET. I have not been coming to HN that long, but from what I have seen, just about any comment that criticizes Apple, popular windows software, or praises open source alternatives to closed source immediately are met with a barrage of down votes.

          edit: and just to clarify, it's not uncommon to see posts on the front page that appear to praise an open source alternative, but anytime you read the comments, the first one is almost always someone who claims that the open source version still isn't ready because it doesn't have that one feature that everybody needs. I know I'm going to sound like a kook, but I would not be surprised in the least if at least 15% of the active HN user base are "shill" accounts controlled by teams that are controlled by different entities. Would HN be a target for operations like this? I think so. There are quite a few high-profile people who regularly come here, and manipulating the opinions of those people are probably in the interests of many organizations. Making sure switching to open source software that isn't distributed by MS or Apple isn't a bold move but a dumb move is in the interest both corporations.

          • thomasz 12 years ago

            Uh, no.

            I downvoted because I want to keep discussions civil and technical. Questioning peoples competency because they name a directory '~/Script' instead of '~/js' or whatever just won't fly here.

            This isn't slashdot. You'll get used to it.

    • NicoJuicy 12 years ago

      I actually haven't met anyone who thought like you.

      WebApi feels great and respects the HTTP spec (PUT, DELETE, UPDATE, POST,GET) and even the OData spec is compliant and after all, it's very fast to implement WebAPI and OData.

      The .Net (mostly Asp.Net) is evolving fast for technologies like SignalR en OWIN.. And actually that's great.

      You could still use webforms if you want, but i woudn't recommend that.

      Most people hate change, but considering the (positive[subjective]) changes, they have done.. I think it's awesome and liberating.

      OWIN has a improved authentication implementation, which has been a long requested feature for Asp.Net. For example, when you wanted to customize the Authentication implementation (don't remember the interface), you had to implement all of the methods (ForgetPass, EmailPass, ...). OWIN fixes that also (which was hard because of their former implementation)!

      The only way it seems like more hassle/mess, is because there are more DLL's being imported, but i don't care because i know the reason behind it :)

      • mattmanser 12 years ago

        I think you fundamentally misunderstood me, I'm not against change.

        I love MVC. Webforms is a complete travesty anyone still using it for new projects is mad. I never understood why Scott Gu defended it, it's a bad choice in the modern world.

        I do not love where they're taking it though, which is to a place of no choice and bad design decisions.

        REST is a bad design decision in my opinion. If you love it, fine, but don't force me to have only 4 methods on my classes. Strict REST doesn't make sense to me, it never has and never will. Most of the APIs I love using don't follow strict REST designs in their APIs and in my opinion those APIs are much better than the ones that do.

        Knockout.js is a bad design decision. Use it if you want. But it shouldn't start adding a load of cruft in my project every time I click 'Add View...' though.

        • NicoJuicy 12 years ago

          I do not understand why you don't like REST ? It's been designed with the HTTP protocol simultaneously and it's how you should develop things for an API : http://en.wikipedia.org/wiki/Representational_state_transfer...

          You are not limited to 4 methods, there are only 4 methods of altering data (eg. CRUD (create, read, update and delete))? Recently, they introduced batch support (i could have used that 3 months ago though :P)

          Errors? Return a standard HTTP Code :)

          Knockout is optional, it's a template to start with. Want to do it yourself? Create an empty project, use one on Github/Codeplex, import an extensions with custom scaffolders (mvc scaffold) or go and create your own with T4 templates, i have done it myselve thanks to some info on Scott Hanselman's blog: http://www.hanselman.com/blog/ModifyingTheDefaultCodeGenerat...

          PS. Kinda curious which API's you are referring to?

    • bananas 12 years ago

      Agree entirely. However from an architectural POV, Asp.net has always been a pile of crap because everything is abstract classes and sealed ones at that. Virtually impossible to reliably test. Interfaces? Never! Even System.Web.Abstractions stinks.

      Having written a view engine, security frameworks, NH session management stuff, 100+ complicated controllers, action filters galore and thrown it into MVC I've come to not appreciate it very much.

      And don't get me started on Razor. Buffered rendering for layouts (bye bye RAM), batshit source, obtuse and non orthogonal syntax, poor runtime integration, absolutely no separation of logic and code.

      I'm ready to move on.

      Edit: just to add, I'm really liking Java's design by committee approach these days. It's incredibly clear that you need a lot of opinions to build a correct and well engineered solution. With .Net in general, it's served up to customers ike a soup kitchen. Occasionally we're left without soup though (WF3, Silverlight, early EF versions, WCF fragmentation, razor and so forth). The majority of the praise comes from people subjected to WebForms for years or even Telerik circa 2006 at the worst.

sequoia 12 years ago

As a long time on-and-off chocolatey user: YAY!!!

I prefer *nix but at work I need to use Windows sometimes, Chocolatey is a HUGE step in the right direction. It boggled my mind that MSFT wasn't throwing money behind the project- it does loads to make Windows friendlier to developers who prefer CLI.

I hope they commit a person/team to evaluating/maintaining/cleaning up packages in the Chocolatey repo.

One question I have tho is why they don't just adopt Chocolatey/cinst (chocolatey install) directly? What's the purpose of get-command (besides ownership which is obviously important). Why not just fork/rebrand chocolatey? Or is that what's happening?

  • j_s 12 years ago

    Yes, Chocolatey has a lot of volunteer-maintained packages that have gone stale; official Microsoft support will pressure software developers to publish up-to-date packages.

    This is good news for Chocolately, which should be able to support these packages even on older versions of Windows.

mands 12 years ago

I wonder how this compares to PsGet (http://psget.net) - or is it simply a cmd-line wrapper around Chocolatey?

  • shanselman 12 years ago

    It's a plugin, but a cleanroom implementation of the protocol and file format of Chocolatey. It's not shelling out. They are side by side and compatible.

  • jon-wood 12 years ago

    Yup, the article explicitly says that the first built in repository is Chocolatey, but I assume it can be extended to support other sources as well.

RayDonnelly 12 years ago

If you like your FOSS I can recommend MSYS2.

http://sourceforge.net/p/msys2

(disclaimer: I work on MSYS2)

  • claar 12 years ago

    I'm a *nix/FOSS guy with 15+ years of experience.

    I spent a couple minutes trying to figure out what MSYS2 was from the project page/the project wiki/Google, and then just gave up.

    Really, a single sentence on the summary page at http://sourceforge.net/projects/msys2 and the wiki at http://sourceforge.net/p/msys2/wiki/Home/ would go a long way.

    For anyone else in the same boat, I assume this is a replacement for MSYS, which according to http://www.mingw.org/wiki/MSYS, is a "collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present."

    • avenger123 12 years ago

      It looks to be a package manager for mingw packages:

      http://www.mingw.org/wiki/MSYS

      At a minimum, they should just put a URL to the above.

      • m_rcin 12 years ago

        This is MSYS (not 2). The web presence of MSYS/MinGW has always been poorly designed. Hopefully it will get better with MSYS2.

        I've installed it recently using info from: http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/

        It has a port of pacman (!) from Arch Linux for package managing. It feels so much better than mingw-get (package manager used for MSYS/MinGW).

        • RayDonnelly 12 years ago

          Yes, pacman is wonderful. We're very grateful to the Arch Linux devs.

          You guys are all correct, we've not paid nearly enough attention to marketing. Here's the description I tried to post:

          MSYS2 is an updated, modern version of MSYS, both of which are Cygwin (POSIX compatibility layer) forks with the aim of better interoperability with native Windows software.

          The name is a contraction of Minimal SYStem 2, and aims to provide support to facilitate using the bash shell, Autotools, revision control systems and the like for building native Windows applications using MinGW-w64 toolchains.

          We wanted a package management system to provide easy installation of packages, and ported Arch Linux's pacman. This brings many powerful features such as dependency resolution and simple complete system upgrades, as well as providing the build system (makepkg) which is used to make these packages. The set of software-building recipes (PKGBUILDs) for MSYS2 itself are at:

          https://github.com/Alexpux/MSYS2-packages

          .. and those for MinGW-w64 (i.e. native Windows software) are at:

          https://github.com/Alexpux/MINGW-packages

          Both 32 and 64bit are supported.

      • RayDonnelly 12 years ago

        mingw and MinGW-w64 are not the same thing, so that URL would be less than useful.

        MSYS2 is firmly in the MinGW-w64 camp. The schism happened when GCC was ported to 64bit Windows and we've not looked back since (much; working together is always to be preferred but sometimes that is not possible).

        We're investigating why sourceforge will not let me update our description.

  • j_s 12 years ago

    This is the info I find after searching a bit:

    http://msys2.github.io/

    http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/

    Seems like a bit of marketing is in order!

  • gerbal 12 years ago

    Some description of the project (really any description) would make me alot more comfortable downloading MSYS2. As it stands, I have no idea what this project is, what it does, or even what the software license is.

    It's a personal preference, but having the code mirrored on a Github repo would be awesome too.

petvalOP 12 years ago

for example Install Sysinternals from PowerShell via OneGet http://www.thomasmaurer.ch/2014/04/install-sysinternals-from...

gnoway 12 years ago

Am I reading correctly that this is a 2012R2-specific feature? Thanks, but what am I supposed to do for the rest of my Windows infrastructure?

  • Already__Taken 12 years ago

    WMF 4.0 with PS 4.0 and DSC etc are available down to windows 7 I imagine this will be the same.

    • j_s 12 years ago

      This is WMF 5.0, so the business side at MS could easily decide to drop support for earlier Windows versions that 8.1/2012R2 - I doubt there's any technical limitation though.

  • shanselman 12 years ago

    No, I'm using it on 8.1 now.

0x420 12 years ago

This is cool. I'm a *nix guy but this actually compels me to learn PowerShell for those rare occasions when I'm working on a Windows machine.

  • klibertp 12 years ago

    You should do it. I worked with PowerShell a few years ago and it was much better experience than shell scripting with bash or tcsh or others. Things I liked:

    You get an IDE for free. It's quite usable out of the box and it's really nice for learning the language.

    It's less reliant on punctuation. There are a few special symbols and they are highly regular in their usage. Syntax feels more readable (to me) than that of bash thanks to this.

    You deal with objects. You can reflect on them (great for exploration), call methods on them, while still having generic ways for composing them and manipulating in large quantities. Yet the language itself is not object oriented, which makes it much simpler than it would be otherwise.

    You get the whole .NET to use. Or most of it. You can basically instantiate and use any .NET class (and COM objects and other such things) without hassle.

    There are a few concepts in the language which unify many concepts from the system. For example you can "cd" into a directory or a key in the registry or a network share or any number of other things which can be thought of as a listable resource.

    This is coming from a programmer, so it's missing things probably important for sysadmins, like security management and built in process of signing and verifying scripts signatures before running them.

    One think I didn't like: it was slow. The other: nothing worked on it (I mean things like python's virtualenv, which comes with .bat file, but not with .ps1 file), even Visual Studio command prompt. I ended up writing some PowerShell code for translating cmd.exe variables to PS ones.

    And, of course, it's Microsoft, so forget about running it somewhere else. But, all in all, if you have to script something in Windows, it's by far better than any other tool.

clemsen 12 years ago

I have been using Chocolatey for a while now without any regret. OneGet probably won't match apt-get at first but this step is definitively in the right direction. If all software providers would provide their repository information updating programs would finally be a one-klick (or one command)-operation.

  • vezzy-fnord 12 years ago

    Chocolatey is absolutely essential for a smoother Windows experience. That said, it still feels like a hack (hardly surprising), but it's nonetheless an invaluable one.

    • avenger123 12 years ago

      I use Chocolatey quite a bit now and can definitely agree with the hack aspect of it. It's not always clear when a package will need your input (since they couldn't automate that part) but for the most part it works.

      I am hoping that since package management is now an official Microsoft effort, a large gain will be to address these "hacks".

      The long term potential of this is that enterprise can build their own repository and push changes out as they wish. This would be the real value. Also, companies that already provide package/software deployment solutions will now have another tool to help them do this.

alexc05 12 years ago

I'd love it if they added console tabs and text reflow / resizing to powershell

I use PS all the time - and it's killing me that I need 4+ windows open to account for all the different projects I've got to work on at the same time.

  • kaelspencer 12 years ago

    I agree. It's a big pain point for me. I've been using ConEmu recently which supports resizing and has tabs (among many other features). My favorite other feature is the tasks: you can define a set of steps to run as a task, then launch that task in a new tab.

    https://code.google.com/p/conemu-maximus5/

  • jamesgeck0 12 years ago

    I've been using ConEmu just for the tabs. You can even have Powershell open in some tabs and PuTTY open in others (although that's a bit of a pain to set up).

    I really don't like the default ConEmu configuration, but it's flexible enough that you can make it do just about anything if you poke at it enough.

callesgg 12 years ago

While I myself wold newer use windows for anything unless there was no other way, I hope that the stuff that Microsoft is doing might influence some windows people to start doing stuff the "right" way.

  • angrybits 12 years ago

    The phrase "the right way" always makes me chuckle a bit. We all seem to know what it is, yet we seldom agree on it. My first 10 years of programming was spent working on a system built on Windows. First ASP/COM and then later ASP.net -- and that thing practically printed money. Did we build it "the right way"? No, certainly not. But our stock options didn't seem to notice, and at the end of the day, that is what matters to me.

    • rbanffy 12 years ago

      > The phrase "the right way" always makes me chuckle a bit

      Here, outside Windowsland, we have been using package management for more than a decade and, after that long, I'd suppose we have it pretty much nailed down. There are still some different ideas and approaches (different dependency management schemes, pre-compiled vs. locally compiled, ports), but I'd guess we get it right most of the time. The "right way" is a tricky concept, but, seriously, this is all very mature by now.

      • avenger123 12 years ago

        Well put. It always amazes me how much further unix/linux is from Windows. Once you get your head out of the "all Microsoft for everything" you really start to see the real advances that are being made everywhere. And then you realize in some ways, Microsoft is always playing catch-up. For desktop apps building for Microsoft is a given, considering the OS monopoly in business and home but for most other things its a question mark.

  • Already__Taken 12 years ago

    Much of this stuff is coming from the Azure people working with the Puppet and Chef people to get the tools needed into windows via powershell I guess.

camus2 12 years ago

can i distribute sources or do I have to compile them first? can somebody download compile my sources without having to download visual studio?

asdfaoeu 12 years ago

I realise its a Microsoft article. But they really couldn't have a fallback monospace font?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection