Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. PowerShell

PowerShell

Scheduled Pinned Locked Moved The Lounge
windows-adminquestiondiscussion
27 Posts 24 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Rob Philpott

    I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

    Regards, Rob Philpott.

    R Offline
    R Offline
    realJSOP
    wrote on last edited by
    #4

    All I know about powershell is that the Package manager console in VS uses it, and in Win7, I managed to completely break it when I had Update 5 installed. Win they upgraded us to Win10, the version of powershell installed with win10 (v5.n?) was evidently too new for vs2013, and we had to install powershell 2.0 to get the package manager console working. That's all I want to know about powershell.

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

    1 Reply Last reply
    0
    • R Rob Philpott

      I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

      Regards, Rob Philpott.

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #5

      Powershell is very useful, especially for sys admins, etc. I have never "needed" to use it - ever, but I would like to learn it.

      N 1 Reply Last reply
      0
      • R Rob Philpott

        I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

        Regards, Rob Philpott.

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #6

        Good idea to have some basic ps scripting know-how in my opinion. It's very handy for running automated tasks on remote VMs.

        Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

        1 Reply Last reply
        0
        • S Slacker007

          Powershell is very useful, especially for sys admins, etc. I have never "needed" to use it - ever, but I would like to learn it.

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #7

          You can learn as you go, so you don't really need to study it for weeks before you get to use it. I only use a subset of ps commands and it's been very useful for me. I would not tell someone I am a ps expert by any means, but that's what so good about it. You can use it as minimally or as advanced as your needs dictate.

          Nish Nishant Consultant Software Architect Ganymede Software Solutions LLC www.ganymedesoftwaresolutions.com

          1 Reply Last reply
          0
          • R Rob Philpott

            I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

            Regards, Rob Philpott.

            D Offline
            D Offline
            dandy72
            wrote on last edited by
            #8

            PowerShell isn't without its syntactic quirks (which will make you pull your hair out until you understand them), but it's still worth learning IMO, especially if you currently do anything at the command prompt. MS has built support for PS in just about every one of their products/services, and if you currently can't do something through some UI, then it's still probably feasible through PS. Personally, I just love the idea of working with the same .NET objects in a script as you do with full-blown, compiled languages. This opens up *a lot* of possibilities. If anyone thinks PowerShell is just an alternative to the string manipulation offered by the various Linux shells (no matter how sophisticated this can get), you need to re-read what PS is really about.

            1 Reply Last reply
            0
            • R Rob Philpott

              I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

              Regards, Rob Philpott.

              R Offline
              R Offline
              RickZeeland
              wrote on last edited by
              #9

              Didn't like it at first because of the way it replaced my beloved Command Prompt in the right-click context menu and wouldn't run dir commands with standard options like /b and /s. But it seems unavoidable, so recently I used it to write a script to download packages from our TeamCity builder, available as a tip on CodeProject, and have to admit I was pretty pleased with all the .NET power you get when using Powershell :-\

              1 Reply Last reply
              0
              • R Rob Philpott

                I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                Regards, Rob Philpott.

                I Offline
                I Offline
                Ian Bell 2
                wrote on last edited by
                #10

                I started using PowerShell reluctantly, have since learned a bit about it and found it to be a very practical and valuable tool. I use PowerShell scripts for such things as obfuscation[^], registry settings, editing WIX deployment projects, setting project versioning numbers, editing repository settings, call them in pre-build and post-build events in my VS projects, etc. If you've ever experienced the frustration of having to debug 'complicated' batch command files then you will shed tears of joy when you realize just how easy it is to debug and walk through PS scripts, line by line, in Visual Studio. Also, as RickZeeland pointed out, if you know .NET then all this is readily available to you in PS.

                History is the joke the living play on the dead.

                1 Reply Last reply
                0
                • R Rob Philpott

                  I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                  Regards, Rob Philpott.

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #11

                  Skip it. It doesn't do anything that a proper program can't. A few years ago I was handed a PowerShell script for gathering some data from some webservices and storing it in our database. It worked, but it had no error handling or logging or anything. So I converted it to C#. Now it has multi-threading and the ability to retry on particular errors and a whole lot of other features we need.

                  S 1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    Skip it. It doesn't do anything that a proper program can't. A few years ago I was handed a PowerShell script for gathering some data from some webservices and storing it in our database. It worked, but it had no error handling or logging or anything. So I converted it to C#. Now it has multi-threading and the ability to retry on particular errors and a whole lot of other features we need.

                    S Offline
                    S Offline
                    Stefan Schier
                    wrote on last edited by
                    #12

                    This is not true. You may use try-catch-blocks and also multi-threading. We created some powerful scripts here already. I agree that C# is smarter for developers. But I must admit that pipelining in PS is a very strong and useful mechanism.

                    S 1 Reply Last reply
                    0
                    • R Rob Philpott

                      I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                      Regards, Rob Philpott.

                      J Offline
                      J Offline
                      Jan Holst Jensen2
                      wrote on last edited by
                      #13

                      Very mixed. The good: * Debugging is excellent. * Syntax is very nice for some commands. * You can do proper loops and structured programming. * Ability to call .NET methods directly is very practical. The bad: * File system interaction is an abomination - lost work due to PS's perception of the file system being out of sync with the real file system (time stamps). Why does it have to have its own file system abstraction that even tries to cache stuff ? * Had to fall back to DOS CMD to get simple stuff working reliably, e.g. mounting a network drive. * Syntax is weird for some commands. * Calling out to other command line tools is ... challenging (e.g. parameter handling). I will wait for the dust to settle on a couple of versions more before I try it again. Particularly the bad file system interaction and awkward integration with other command line tools has scared me away.

                      1 Reply Last reply
                      0
                      • R Rob Philpott

                        I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                        Regards, Rob Philpott.

                        S Offline
                        S Offline
                        spoljarecDamir
                        wrote on last edited by
                        #14

                        PS is a great tool to have in your belt, absolutely get to know it :thumbsup: There is a great Power Shell v3 course over on MVA (Microsoft Virtual Academy) if you're interested.

                        R 1 Reply Last reply
                        0
                        • R Rob Philpott

                          I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                          Regards, Rob Philpott.

                          S Offline
                          S Offline
                          sir_download_alot
                          wrote on last edited by
                          #15

                          I got into PowerShell end of last year when the guy that did the regular system checks was retired and the other moved to another department. So I took on the challenge to do a deep dive into it and automated the necessary system checks and more with PS. It proved to be the right tool for the job. Of course there are tool that you can buy or you can use a programming language to crank something out but the necessary resources were not available and I wanted to learn how to do it with PS. I had some light exposure to PS before. One success factor (probably the most important) for me was to use VS Code with all the power of the available extensions, the writing, testing and debugging of my scripts was pretty efficient and fun to do with this editor. As usual, I spent some time on Stackoverflow too! The following was implemented over a period of maybe 2 Month (only occasionally found time to work on it): Parsing Windows Log for specific events Parsing a 3rd party tool log for specific information Checking network folder availability Checking status of Web Sites Checking status of SQL Server databases File conversion tasks for a productive system All of the above is using emails to alert if something fails (including attached logs and HTML reports) Configuration is done using a JSON files Some of the scripts are used as part of an SQL Server job, others are started using the Windows Task Scheduler on a server. I started to tinker around with SQLLite to store some data and create a timeline with Google Chart services using that data. However, this is already more than I actually need but it worked. One thing I like the most is the ease of deployment. Just copy the script and you are done. Working with parameters can be a bit nifty but when you get the hang of it, it is Ok. The possibility to us, in addition to the native cmdlets, .NET Framework Classes makes PowerShell extremely versatile and powerful. Would I do it again? Certainly!

                          1 Reply Last reply
                          0
                          • R Rob Philpott

                            I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                            Regards, Rob Philpott.

                            I Offline
                            I Offline
                            iacopovettori
                            wrote on last edited by
                            #16

                            I played with it, it is worth to learn. You can always type "cmd" and enter in cmd-mode. You just have to type "exit" to return in PS-mode.

                            1 Reply Last reply
                            0
                            • S spoljarecDamir

                              PS is a great tool to have in your belt, absolutely get to know it :thumbsup: There is a great Power Shell v3 course over on MVA (Microsoft Virtual Academy) if you're interested.

                              R Offline
                              R Offline
                              Rob Philpott
                              wrote on last edited by
                              #17

                              I think I am. What harm can new knowledge do? Thanks for the tip.

                              Regards, Rob Philpott.

                              1 Reply Last reply
                              0
                              • R Rob Philpott

                                I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                                Regards, Rob Philpott.

                                A Offline
                                A Offline
                                agibs
                                wrote on last edited by
                                #18

                                I would say it's definitely worth learning. If you work with Continuous Delivery using Microsoft's tools then Powershell becomes very useful. We us it in this scenario often to execute scripts remotely on our servers for backups and various other functions.

                                1 Reply Last reply
                                0
                                • R Rob Philpott

                                  I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                                  Regards, Rob Philpott.

                                  L Offline
                                  L Offline
                                  Lucas Vogel
                                  wrote on last edited by
                                  #19

                                  One thing to keep in mind is that they keep all their modules in GitHub, and they like to introduce breaking changes in major release versions. I once upgraded the Azure PS module on a build server and it broke VSTS because they decided to stop supporting a parameter VSTS used extensively in its infrastructure.

                                  1 Reply Last reply
                                  0
                                  • R Rob Philpott

                                    I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                                    Regards, Rob Philpott.

                                    S Offline
                                    S Offline
                                    sasadler
                                    wrote on last edited by
                                    #20

                                    The only time I ever used it was to 'really' remove Windows 10 Apps that were unistallable.

                                    1 Reply Last reply
                                    0
                                    • R Rob Philpott

                                      I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                                      Regards, Rob Philpott.

                                      R Offline
                                      R Offline
                                      Richard Givis
                                      wrote on last edited by
                                      #21

                                      PowerShell is awesome. Simply amazing. Easy to learn. Get a copy of Windows Powershell Programming for Absolute Beginners. You will learn it easily, and never look back at that ugly CMD Prompt again.

                                      1 Reply Last reply
                                      0
                                      • R Rob Philpott

                                        I don't understand PowerShell, principally because its something I've always actively avoided. Looks nasty, but you can do some clever stuff with it so it seems. Some of my peers have this skill. I'm wondering if I should get to know it. Anybody here got any opinions good or bad?

                                        Regards, Rob Philpott.

                                        R Offline
                                        R Offline
                                        Retired2017
                                        wrote on last edited by
                                        #22

                                        I have been a linux user since the late 90s. Whenever my arm was twisted to work on on a windows setting (all to often X| ) the first thing I always did was install cygwin on it before anything else. bash saved me from early insanity. I never looked at PowerShell, maybe I have missed something. Next time I'm young I'll try it, promise.

                                        F 1 Reply Last reply
                                        0
                                        • R Retired2017

                                          I have been a linux user since the late 90s. Whenever my arm was twisted to work on on a windows setting (all to often X| ) the first thing I always did was install cygwin on it before anything else. bash saved me from early insanity. I never looked at PowerShell, maybe I have missed something. Next time I'm young I'll try it, promise.

                                          F Offline
                                          F Offline
                                          firegryphon
                                          wrote on last edited by
                                          #23

                                          Is there really anything else ever needed if you have bash, awk, sed and grep?

                                          R 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups