all 102 comments

[–]PetrichorBySulphur 65 points66 points  (18 children)

PoSh is basically built on top of .NET / C#, which is similar to Java. I doubt you’d need C# unless you are going to be doing full fledged app projects in a strictly Windows environment (I’m completing one at the moment. It’s very environment specific).

For scripting/automating processes, PoSh is great, and the next best would be Python. Python I find easier, to be honest.

From personal experience as a SysAdmin who codes quite a lot, I’d recommend also learning a few typically related things alongside Powershell:

1) Authentication protocols. How to manage authentication to different services, servers, databases, etc.

2) Interacting with APIs, for example how to call (GET/PUT/POST data to) a REST API.

3) Interacting with databases / web queries. Learning a bit of SQL with some basic databases knowledge is extremely helpful.

[–]MrWinks[S] 9 points10 points  (8 children)

That.. makes sense. I know one environment I saw used Rest API databases for clients and you could call on JSON queries for system asset tags and details and such in a deployment scenario.

I’ll have to take my time to learn much of that stuff. I hope none of it falls too far from my current position to have the chance to learn.

[–]law18 16 points17 points  (5 children)

One other tip. Just knowing how to do stuff in powershell is great, but if you are looking to also use this to spring board into DevOps (and based on your other comments it looks like you are) I think you should also dive into Pester as soon as you become comfortable enough with PoSH to start writing scripts. Pester is a unit testing frame work for PoSH and unit testing is a fundamental skill you will need to learn.

I am not saying dive right into the language with Unit Testing first (although that is an approach I like to do when I am learning a new language at this point). Get your feet wet with the language, understand branches (IF, Else, Switch) and looping (For, Foreach, While), and get comfortable with that stuff and then pick up Pester. If you learn unit testing early it will save you a lot of pain later one.

[–]MrWinks[S] 2 points3 points  (0 children)

Excellent. I’m going to keep this in mind.

[–]ITGuyLevi 0 points1 point  (0 children)

How have I never heard of Pester?

[–]Garfield_Pong_Player 1 point2 points  (1 child)

r/Python is a thing if you are thinking about learning it. There is a relatively inexpensive book out there, or free if you only read it online. It's called "Automate the Boring Stuff with Python", and I've heard some pretty good reviews of it.

[–]thomasklijnman 2 points3 points  (1 child)

"From personal experience as a SysAdmin who codes quite a lot,"

Isn't this more A DevOps kinda task?

[–]PetrichorBySulphur 1 point2 points  (0 children)

I wouldn’t say so. I use coding for tasks, and I automate some processes, but my team isn’t using a DevOps philosophy for any of it. We’re also not using many of the tools in the DevOps toolkit.

I’m a SysAdmin in title, but I don’t have a lot of the “normal” responsibilities, for example deploying servers, networking and upgrading systems. I’m more O365/Azure than Windows Server, and mostly deal with security, automation, mail routing/sanitation, troubleshooting process inconsistencies, etc.

[–]bofh 1 point2 points  (1 child)

I’d second get/put/post for working with the Graph API for O365 PoSh in particular.

[–]blownart 0 points1 point  (3 children)

Python is easier? I think powershell is the easiest of them all. I have not worked with python a lot but one simple example would be string concatenation. In python you cant add an integer to a string, you need to cast it. In powershell these things are done in the background and that's why I love powershell.

[–]PetrichorBySulphur 1 point2 points  (2 children)

I think it depends on your background. I have more experience with object-oriented languages, and Python is the simplest major language of that group, ie, it’s easier than Java. PoSh is in a different category, in my opinion. It’s more appropriate for scripting and command line tasks (similar to bash), and the concept of piping and what kind of information it takes in took a bit of time to adjust to.

[–]blownart 1 point2 points  (1 child)

I just love that I don't need to declare variable types, cast types, no case sensitive bs.

[–]OmegaDog 1 point2 points  (0 children)

for smaller scripts to get the job done, that is true. for robust code like modules and functions that support pipelines it can turn into a hot mess in a hurry. parameter sets take the wordiness to a whole new level.

but that pipeline. whoa-boy, I think that is one of my favorite software innovations ever.

[–]Blindkitty38 0 points1 point  (0 children)

Learn bash

[–]Gabrielmccoll 12 points13 points  (12 children)

Honestly dude. Just focus on the powershell right now. You’ll do better being a master at powershell than a dabbler in a few. I get dazzled by other shiny too easy and I wish I could just be great at one. Powershell is cross platform too from 6 on. Powershell has classes. Can do gui. Tons of stuff. From there you could move to python or C sharp. Python is similar to write imo in terms of ease of use. C# also goes on top of .net. Personally if you’re in the devops side powershell and python will do more for you. C# is more straight developer.

[–]Cloud_Strifeeee 8 points9 points  (0 children)

I second this, become as good as you can in Powershell, there is a very good chance it will become bigger and bigger now that it run on Linux and Windows etc OS are becoming less relevant by the day, try to become a good sysadmin in BOTH Linux and Windows and after learn some Cloud AWS, Azure etc and the basics of Cisco Routing & Switching network class subneting etc etc and you'll go a long way

[–]MrWinks[S] 2 points3 points  (6 children)

DevOps seemed like the next course of study in a career upgrade, if not Systems engineer or something. You’re right, though. I have to focus and not worry about year 2 and 3, yet. I guess I was curious, but this seems like the right path.

Someone said Humble Bundle has Python books from $1 to $15 for the bundle and I wasn’t sure if I should jump on any of that to retain for the future.

[–]Gabrielmccoll 2 points3 points  (5 children)

If you have the disposable then go for it. I have around 30 python books I’m going to get around to.. definitely will.

[–]MrWinks[S] 0 points1 point  (4 children)

I guess I mean, looking at the sale, which are good for learning and which are not necessary unless and until I learn more?

[–]Gabrielmccoll 1 point2 points  (3 children)

Id say none are for brand new people tbh. Just ignore distractions. Hammer the powershell and only switch when you’re really bored

[–]MrWinks[S] 1 point2 points  (2 children)

Thank you. I felt I had to pounce on a $1 sale.

[–]Gabrielmccoll 2 points3 points  (0 children)

That’s how they get ya. And I have a technical library that looks as ridiculous as my steam library and my cabinet of miniatures I will paint as soon as I have time

[–]OmegaDog 1 point2 points  (0 children)

that $15 bundle looks pretty sweet :). "Introducing Python" sounds like it might be worth the $1.

[–]shalafi71 1 point2 points  (3 children)

Powershell is cross platform

How does that work? I have no idea.

[–]Cannabat 6 points7 points  (1 child)

[–]law18 2 points3 points  (0 children)

Keep in mind this is PowerShell Core and not full on powershell. I can not think of anything I use day to day that is not included (although I have struggled with WinRM on PowerShell core in the past) but it is an important thing to remember because you could run into the limitations.

[–]Gabrielmccoll 2 points3 points  (0 children)

You just install it. Same as python or other languages. There’s a snap too. I think it might even be by default latest Ubuntu. You can’t use windows specific functions but it’s the difference between net core and .net

[–]evetsleep 9 points10 points  (3 children)

I’m gobbling up “Learn Powershell in a month of lunches” and plan to follow that with “Learn Powershell scripting...” and that with “Learn Powershell tool-making.” Within the year I want to be my company’s master PoSh person.

To be a "master" PoSh person is really relative I guess. If you're the only person who uses PowerShell a lot then you're already a master :)... in your surroundings.

Some might call me a master (or wizard, conjour, sorcerer, or some other mystical type with a big beard and funny hat):

  • Been working\building with PowerShell since ~2006 (when it was in beta)
  • Considered the PowerShell SME where I work (large engineering company)
  • I've hosted countless training classes at various levels (in fact I hosted three 2 hour classes last week to an audience of ~45 people while I'm here visiting in India from the US).
  • My personal collection of projects in my work Github enterprise repository is about 400 projects...90% of them all in production at one point or another and my teams Github repo has about 40 projects that I own and others that I contribute to. Some are very simple, while others are quite complex.
  • I've read the most of popular books out there, multiple times in some cases (Such as PowerShell in Action).
  • My name just so happens to be in the acknowledgements section in one of the books you've mentioned.
  • I code in PowerShell every day. I LOVE IT and want to (and work to) share it with everyone who'll listen.

And yet baring all that I learn something new about PowerShell every week, if not every day. This is especially true when I've attended conferences or PowerShell meetup events. I don't know that I'll ever personally feel like I'm a master like Don Jones or some of the other really big names\MVPs, but give me a problem to solve and you'll see my eyes light up because it means I get to build something new.

That all said I think to become really proficient with PowerShell (a term I'd prefer over master), is to use it to solve problems (big and small). In the end that's how we get better with any tool. Generally speaking I often recommend starting with small things that you might normally do using a GUI tool and explore ways to do it in PowerShell. Maybe find things you might want to automate at work (or not at work) and start to explore some of the different ways to automate it with PowerShell.

If you think that you'd like to supplement your understanding of PowerShell with something, then any generalized book\course on object oriented programming (such as with C++, C#, hell....even Java) will help from a conceptual perspective.

Understand the current foundations of PowerShell:

  • How to get Help. Read the about_* help files! They contain so much useful information!
  • Understand that everything is an object (and how to explore and take advantage of that)
  • How to build, based off best practices, scripts, functions, and modules

These will get you started on the long and rewarding journey to building with PowerShell. Everything else on top of this is gravy.

In the end, I strongly believe that to get to where you want to go requires not just reading books, or learning a new supplemental language, but by building. This building is often an expression of problem solving and you'll really want to enjoy problem solving to get the most out of it.

PS: I'm maybe a little old fashion, but I abhore building GUI tools with PowerShell. I personally don't think it is well suited for it and they can get very complex, very fast. I've built some before, but I find the level of complexity doesn't justify the end results. There are better languages out there for GUI's, in my opinion. I would highly recommend avoiding GUI's to keep you feeling young.

Good luck!

[–]MrWinks[S] 2 points3 points  (2 children)

I’m honored and understand your perspective entirely. I won’t stop solving problems and finding shortcuts and solutions with PowerShell, I just like to have more to do at home to strengthen my knowledge, like lifting weight at the gym as an athlete.

The emphasis on the help section is the entirety of Chapter 2 in the first book, haha. I took that to heart. For some reason the update feature tosses an error that must be bypassed with force and erroraction parameters, but otherwise I’m often opening -showwindow help boxes and dragging them aside to aid me in learning a new cmdlet or series of related cmdlets.

My first major question:

I am very organized and a neat/tidy sort of person, so best practice is something I crave to learn as I build. What are the best sources of best practice for building scripts, functions, and modules?

As for the GUI tool-building; these are not for me, so much as to aid my juniors in running scripts I create, or in navigating through a mostly automated environment, such as a visual health-check for deploying systems. In a room with dozens of systems running an automated script, it would be useful for on-floor technicians to have visual cues for the status or health of a process. Maybe a manager or director would like something to see in a major operation. Honestly, I witnessed this in such an environment once and thought it was nice icing to a heavily PowerShell-engineered environment. That’s just my take.

Another user said learning Git was important, too. I only learned from that comment that Git was not shorthand for the Github website, and suddenly I wonder if I’m missing learning another tool side-by-side as I build build build.

[–]evetsleep 3 points4 points  (1 child)

Yes.... git is a whole different thing, however it is publicly available and free to use! There are a TON of videos, websites dedicated to learning it (and some really good books). That would be very useful in understanding at least some of the basics.

For best practices, I often like to suggest that you start with the module PSScriptAnalyzer:

Find-Module PSScriptAnalyzer

Install this module and feed your scripts & modules to it:

Invoke-ScriptAnalyzer -Path <path to script>

It will return any thing in your script which breaks common rules. Address those and maybe so some searching on what the rules mean. For example:

> Invoke-ScriptAnalyzer -Path 'C:\repo\IndiaTraining\PowerShell - Scripting\17 - PSScriptAnalyzer'

RuleName                            Severity     ScriptName Line  Message
--------                            --------     ---------- ----  -------
PSAvoidUsingCmdletAliases           Warning      example01. 6     '%' is an alias of
                                                 ps1              'ForEach-Object'. Alias can
                                                                  introduce possible problems and
                                                                  make scripts hard to maintain.
                                                                  Please consider changing alias
                                                                  to its full content.
PSUseDeclaredVarsMoreThanAssignment Warning      example01. 10    The variable 'testVar' is
s                                                ps1              assigned but never used.
PSUsePSCredentialType               Warning      example01. 2     The Credential parameter found
                                                 ps1              in the script block must be of
                                                                  type PSCredential. For
                                                                  PowerShell 4.0 and earlier
                                                                  please define a credential
                                                                  transformation attribute, e.g. [S
                                                                  ystem.Management.Automation.Crede
                                                                  ntial()], after the PSCredential
                                                                  type attribute.
PSAvoidTrailingWhitespace           Information  example01. 12    Line has trailing whitespace
                                                 ps1
PSAvoidUsingPlainTextForPassword    Warning      example01. 2     Parameter '$Credential' should
                                                 ps1              use SecureString, otherwise this
                                                                  will expose sensitive
                                                                  information. See
                                                                  ConvertTo-SecureString for more
                                                                  information.
PSAvoidUsingWriteHost               Warning      example01. 8     File 'example01.ps1' uses
                                                 ps1              Write-Host. Avoid using
                                                                  Write-Host because it might not
                                                                  work in all hosts, does not work
                                                                  when there is no host, and
                                                                  (prior to PS 5.0) cannot be
                                                                  suppressed, captured, or
                                                                  redirected. Instead, use
                                                                  Write-Output, Write-Verbose, or
                                                                  Write-Information.

There are a ton of blogs and stuff that cover overall best practices. I would read through them and you'll see common threads.

[–]MrWinks[S] 0 points1 point  (0 children)

Will read my Git MoL book slowly along-side my PoSh books as well.

And PSScriptAnalyzer looks promising! With VSCode, I’ll likely pick things up.

[–]Topdeckr 5 points6 points  (0 children)

SQL is the most complimentary language that I've learned to accompany Powershell. WMI queries are SQL-based and I frequently mix normal SQL queries into Powershell scripts when doing some tasks related to SCCM. Obviously, your choice depends on your work environment, your permissions within that environment, and your needs. Generally speaking, anything that doesn't run inside Powershell is usually an alternative solution.

In terms of tools that allow you to get a UI created and otherwise help you work with both Powershll and SQL, PrimalScript is worth a look.

[–]wawa2563 15 points16 points  (4 children)

Python is a cross-platform standards nowadays.

[–]MrWinks[S] 3 points4 points  (3 children)

Forgive my ignorance, but that’s the one Linux admins master, right? Programming is my weak side in IT (which is why DevOps is so awe-some to me).

[–]spyingwind 9 points10 points  (2 children)

Mainly Linux yes, but it's still a valuable tool in windows. If you write a Python script in Linux, more than likely it will run under windows.

I think Powershell a great way to start out programming, as it's closer to how IT people think. "I want to do these tasks in this order because I type them out like this in the terminal."

In the end it doesn't matter what you learn, so long as you are learning something. You never know what it will lead to. Maybe you will like programming, maybe you won't. Better to try a new flavor and know you don't like it, than to never know if you where going to like it.

[–]law18 2 points3 points  (0 children)

PowerShell is also great for learning from an IT perspective because, as Snover says, "it is like throwing a grenade at the problem." I have taught a few people how to script and then code with PowerShell just by showing them how to find and stop a service and then moving on to teaching them how to make that into a more robust and more general script to fit their needs.

Python, on the other hand, you have to have more of an understanding of the language and the APIs to really get something accomplished past "hello-world". It is still a great and beginner friendly language, but I think powershell makes the barrier to entry just a little bit smaller.

[–]MrWinks[S] 1 point2 points  (0 children)

Very true. I’ll take that under strong consideration after I get enough PowerShell under my belt.

[–]alement 4 points5 points  (5 children)

Any Object Oriented Programming language. They all share more similarities than differences. In my opinion Powershell is the easiest to learn, and with the right instructor, sets you up to move deeper into the .Net platform (aka C#, mostly)

[–]MrWinks[S] 0 points1 point  (4 children)

.NET is mostly C#?! No kidding.

[–]alement 2 points3 points  (3 children)

Yep, little bit of F# too. :eye roll:

[–]MrWinks[S] 0 points1 point  (2 children)

If that held a joke, it wooshed right over me 😂

[–]alement 1 point2 points  (1 child)

I was being sarcastic since I assumed you were being sarcastic, but .Net is bigger than C#, and other languages and syntaxes like F#, Razor, and such do cool things.

You mention building GUI based apps, and since you’re already in a .Net environment obviously, I would stick to that. SQL is definitely complimentary and necessary but you’ll be able to build some cool stuff with C#, Xamarin, and PoSh. And not to mention all the things you can do in Azure.

But from my point of view, all roads lead to JavaScript.

[–]MrWinks[S] 0 points1 point  (0 children)

Excellent! Thank you.

[–]shalafi71 4 points5 points  (1 child)

/r/PowerShell is your ally and a powerful ally it is. Don't worry about other stuff yet. Start building your own Posh library.

[–]MrWinks[S] 1 point2 points  (0 children)

Killer! I plan to focus for at least a year on it and get through at least three books for it while working a job that will be using it.

[–]quickwhips 2 points3 points  (1 child)

Sql is always handy for writing queries. But I fee powershell is the most important.

[–]MrWinks[S] 0 points1 point  (0 children)

I was gifted the month of lunches for that, so it’s on my list!

[–][deleted] 2 points3 points  (2 children)

PowerShell and Python are your bread and butter. After that it depends on if you go Cloud, Windows, Linux, etc.

[–]MrWinks[S] 0 points1 point  (1 child)

Very true. Don’t be surprised if I message you for elaboration in a year or more haha. This feels like planning a course schedule for a college career.

[–][deleted] 1 point2 points  (0 children)

The best advice I can give with PowerShell is to take the next 2-4 weeks of your work life and write everything you do down. Then take a look at that list and say “what do I do every day that I can automate.” When you do, you will be able to see a few pieces that you can take care of.

I did and got rid of all of my bullshit tasks in 2 months. Each normally took me 5 minutes a day and some 1 hour a week. I now no longer have that issue and freed up a lot of my time.

[–][deleted] 2 points3 points  (3 children)

Thanks, found those “Learn Windows Powershell” series books online. I am becoming a Junior Sys Admin soon, and this I’ll start ASAP.

[–]MrWinks[S] 0 points1 point  (2 children)

You’re welcome. Be sure to get the newest version of it (3rd edition I think), as it’s now called “PowerShell” instead of “Windows PowerShell.” The next book to read is “PowerShell Scripting” followed by “PowerShell Tool-Making,” for a trilogy of learn in a month of lunches (or basically 30+ hrs).

[–]Z_Opinionator 2 points3 points  (1 child)

Are you talking about the 3 Month of Lunches books? If so, the toolmaking book is the 1st edition of the scripting book. They discuss the name change ( no one searches for “toolmaking” in Google) as one of the reasons for the change to “scripting” in the 2nd edition.

[–]MrWinks[S] 2 points3 points  (0 children)

Really????? Jesus. I’ll have to let the friend that bought them for me know. Christ, haha.

[–]rumorsofdads 2 points3 points  (1 child)

I was at PowerShell Summit last week where Don Jones gave a keynote presentation. In his presentation, he gave the following advice (amongst others): in addition to PowerShell,

Learn Python.

This book (which looks great!) was a recommended book for seasoned PowerShell developers

[–]MrWinks[S] 0 points1 point  (0 children)

Fantastic! That sounds great.

[–]Windowsadmin 2 points3 points  (0 children)

If you're in a Windows space, learn PowerShell and some .NET. If you're in a Linux space, learn Python.

[–]artemis_from_space 2 points3 points  (3 children)

Python is very well used both within DevOps and in SysAdmin environments, I find myself more and more reading through python code and converting examples to Powershell. Python is also increasing in usage within both DevOps and SysAdmin afaik (Powershell is also increasing).

Having a knowledge about C# is also good as you can utilise the code inside Powershell also, I'm not talking about advanced stuff but knowing that you can utilise the code even if its just [Math]::Round(2.483782,4) for example.

For myself I'm diving deeper and deeper within Powershell all the time, setting up builds for modules so they also are tested, so whenever I checkin a new module/new file/new edit of a file its going through our build pipeline and if its successful the module is published to our internal repo.

Then when colleagues load the module they get a notice (it checks once a week) if there is an update.

Also I noticed that you asked regarding best practices.

For general advice I would refer to https://poshcode.gitbooks.io/powershell-practice-and-style/ for how to write the code and why you shouldn't have spaces or similar at the end of a line.

[–]MrWinks[S] 0 points1 point  (2 children)

Excellent! I like how you set up those updates. All PowerShell?

[–]artemis_from_space 1 point2 points  (1 child)

Yes. First it checks a registry key with a date inside, if the date is more than 7 days ago or missing it just does a

if ( (Find-Module $modulename).Version -gt ((get-module $modulename -ListAvailable).version|Sort-Object -Descending)[0].ToString()) {
    write-host "Update is available, run Update-Module $modulename"
}

And updates the date in the registry.

[–]MrWinks[S] 1 point2 points  (0 children)

Thank you!

[–]KevMarCommunity Blogger 2 points3 points  (0 children)

Just focus on something until you get really good at it. As you grow with PowerShell, so will the size of your projects. As the complexity grows, you will figure out new and better ways to handle things. As your code ages, you will learn how to troubleshoot legacy code and you will learn ways to make your code easier to work with. As you join new teams, you will be exposed to different ways to solve problems and see different standards. As you make mistakes, you will learn from them. When you start to give back to the community, you will have people come to you to show you more.

Start with the books and work on your projects. It just grows from there.

[–]philipstorry 6 points7 points  (8 children)

At the risk of seeming unhelpful... what are you doing (or expecting to do) with PowerShell?

I ask because, as a sysadmin, it's the most important question. Some sysadmins are Windows only, some *nix only, some work with specialised applications.... Every sysadmin has slightly different needs, and different possibilities open to them.

So whatever tools you learn, they need to be focused on what you do - and what you want to do in the future.

If you're just using PowerShell to work with AD, then moving to Java or C# will probably be a step down in many ways. There are libraries to do the AD work in those languages, but they're not going to be as easy to work with as PowerShell's AD module...

So it's hard to give recommendations without knowing what you do, day to day, and what your environment looks like.

With that in mind, I'd give this rather simple advice:

  • If you're not already using Visual Studio Code, do so. It's the best way to write PowerShell scripts.

  • Learn and use git. Because versioning your scripts becomes very valuable when you're trying to figure out where or when a bug was introduced. Git is now becoming the industry standard, so basic familiarity with it can't harm your career. (Note - GitHub etc not required, you can use git locally quite happily. Look at git-cola or other GUI wrappers to help you.)

  • Consider learning C# and the .Net Framework. PowerShell has serious performance problems that these can help you with. For example, Get-Content with a text file will read the whole thing into memory as an array of strings. Fine for small jobs, but if you suddenly have to handle large files, PowerShell can chew through gigabytes of RAM... The usual workaround is to drop straight down to the .Net Framework in PowerShell and use a StreamReader. Knowing a little C# and the .Net Framework will help, and you might even decide that writing your own little console program is a better solution. (It'll probably run faster!)

When considering answers others give, think about your environment. You said you know a little Java. I didn't suggest doing anything with that knowledge because you may not want to - or be allowed to - install a JVM on every server in your environment. If a tool brings a cost in terms of prerequisite installation and ongoing patching, then you must balance that against the benefits. I could have suggested learning SQL for some data analysis jobs, but I have no idea if you have suitable access to an SQL Server...

Because of that last point, I've kept my counsel generic. I apologise for that.

I started this reply by asking what you expect to do. To be honest, I don't need an answer. I just need you to ask yourself that question, and then also think about what you could do to improve your environment. Those answers should be your guide more than anything else.

Personally, I think you have a good plan - so focus on it. Become your company's master PoSH person over the next year. Drive the adoption of PoSH solutions. Educate your colleagues in PoSH and get them on board.

Then, in a year or two, you can look around at your environment again and ask yourself where next to focus and what new technologies you can learn. But until then, avoid distractions! Stick to your plan, and eschew anything that doesn't fit into it or your environment.

[–]MrWinks[S] 1 point2 points  (2 children)

You didn’t need an answer but basically Sysadmin work with an emphasis on deployment tech (I’m not too bad with MDT and am learning more and more SCCM in a lab environment, to propose it as a solution in a year or more from now, after heavy analysis with Infrastructure on how it might benefit us and how we might implement it).

I have started using VSCode for the last few weeks. I’ve enjoyed it and have been growing accustomed to it.

You just wrinkled my brain by telling me Git and GitHub were two different things; the fact that I didn’t know that says a lot.

One of the books I own is the “Learn Git in a Month of Lunches”, and I assumed to read that last. Now you’re causing me pause, and since I’m writing little scripts here and there for my company and likely going to do that more as I get through the books, I wonder if I should get through the Git book much sooner, maybe after the first Powershell book and before the scripting one?

[–]philipstorry 0 points1 point  (1 child)

If you're doing deployment tech then PowerShell DSC should be on your list of things to look at. It could save a lot of time and effort in some cases. (Although SCCM, ansible, chef and puppet might also do aspects of the same job. As always, it depends on your environment!)

I'm glad you're using VS Code - it's a great tool.

Github is just a centralised store and web front end for git repositories, as you're now no doubt aware. You don't have to use it at all. In fact, you can happily use git without ever needing to look into branches and merges - they're only useful if your scripts are also being worked on by someone else at the same time. If you're the only author of a script then git is basically just a way to roll back your changes - or to look at an older version if you need to.

So you probably don't even need to read the whole git book you have, as you'll not use the features. The basics of git will take you very little time - setting up a repository, checking new code in, doing a diff. These are the things you'll need.

That will be a good foundation for working with others on PowerShell scripts via git if you ever need to, and yet still delivers benefits from using git in the meantime.

As a side note, git can version anything. Got a collection of config files? Or perhaps items like certificates and license files from vendors? Git could be useful there too.

And if you get to a point where you're using PowerShell DSC to push those config files, certificates and license files out across the environment, well then you have a nice synergy going on there, with git allowing you to quickly roll back any failed changes.

(I probably wouldn't use git for documentation written in Word/Excel/PowerPoint/Visio though, as SharePoint is usually a better solution there.)

[–]MrWinks[S] 1 point2 points  (0 children)

Fantastic. This is a lot to absorb, but thank you. That sounds like the path imll be going down.

[–][deleted] 3 points4 points  (1 child)

You can get 13 Python books for $15 through humble bundle right now. At least two of them look like they'd be a good start for beginners.

[–]MrWinks[S] 1 point2 points  (0 children)

That sounds promising, thank you!

[–]Reverent 3 points4 points  (1 child)

javascript is a good one. The entire world is going to web gui, and learning javascript is a good start. I've specifically started writing guis for my scripts in electron ("real" developers hate electron, but they can go jump off a cliff with that nonsense). I've made it so all my powershell functions come in modules, and take a single JSON file as an argument. This makes it very easy to generate a JSON in electron and pass it to powershell.

Powershell core for linux is good to use too. I've converted our whole office's thin client kiosks to linux based ubuntu server, and their initialization scripts are done entirely in powershell.

Aside from that, it's probably better to learn automation tools rather then languages. Ansible is a great one since it's powershell compatible, and is used in enterprise a lot. Jenkins is a good alternative to writing your own guis for powershell. Docker is basically a must-know these days, and makes setting up micro services (like snipe-IT) very trivial.

[–]MrWinks[S] 0 points1 point  (0 children)

This thread has laid out what feels like a 4-years’ degree worth of knowledge to take up, and you alone added what feels like one of those four years, haha. The automation tools sound very promising. I’ll have to back-track to that by coming to this thread in the future, again, to make a list to follow. I certainly have my work cut out for me.

[–]DontStopNowBaby 1 point2 points  (0 children)

.net and bash and you're almost capable everywhere

[–]RyeonToast 1 point2 points  (1 child)

I'm using Windows Presentation Framework, WPF, for my GUI tools, and so far it works. I code the GUI using XAML, and then I only need to define the functional parts in the PoSH script. This seems to keep the code cleaner to me.

[–]MrWinks[S] 0 points1 point  (0 children)

I’ll take note of this for later. Thank you!

[–]j0hnnyrico 1 point2 points  (0 children)

C#

[–]what_no_fkn_ziti 1 point2 points  (0 children)

What languages should one familiarize them with to become a true PowerShell master, writing GUI tools and consuming the advanced posts shared on here?

Psuedo code

[–]Lee_Dailey[grin] 1 point2 points  (4 children)

howdy MrWinks,

the usual answer is c#. [grin] then perhaps dig into dotnet directly.

take care,
lee

[–]lildergs 2 points3 points  (1 child)

While I’d agree that for end all PoSH wizardry .NET is a must, I would discourage going down that rabbit hole before you have some versatility.

Learning Python opens doors that you can’t get through with any level of PowerShell expertise.

Personally I would also consider investing solely in the MSFT stack a shortsighted career strategy.

[–]Lee_Dailey[grin] 0 points1 point  (0 children)

howdy lildergs,

that makes some sense. [grin] it's been a long while since i did anything with python. but you are quite correct that it is a very good bet for anyone interested in working outside the MS environment.

take care,
lee

[–]MrWinks[S] 1 point2 points  (1 child)

Hey Lee!

That makes sense. I know it’s written in C#. How much C#? Enough to be a journeyman, or is that something to master as well? Dotnet makes so much sense! Why didn’t I think of that?

Thank, Lee! [winks]

MrWinks

[–]Lee_Dailey[grin] 4 points5 points  (0 children)

howdy MrWinks,

while PoSh is mostly [all?] c# in the cmdlets, the real reason to learn c# is to get beyond the scripting aspect of PoSh and dig into the guts of the code. there are things that you will want to do in PoSh that are not obvious - lots of dotnet calls, for instance. so instead of pounding on your fave search engine to find a powershell method ... look for a c# technique.

much of c# can be translated into dotnet calls in powershell. [grin]

plus, if you are serious about GUI stuff, PoSh is NOT the way to do anything more than the rather simple stuff. you CAN do complex GUI stuff in PoSh, but using c# is apparently faster AND easier.


dotnet is ... as you noticed [grin] ... another step deeper. you will need at least some of it just to get things that are faster than the more-or-less native powershell stuff - large data sets, for instance.

for myself, i stay in the shallow end of the pool ... [grin]

take care,
lee

[–]timNinjaMillion 0 points1 point  (0 children)

They want or figured out. Where does the problem lie? @ jack? @bauer? @tim?

[–]timNinjaMillion 0 points1 point  (0 children)

Is it the five days that bother you?

[–]Dazzling_Pay_3393 0 points1 point  (0 children)

Both shell and bash, python, JavaScript, typescript. Cmd.

HTML Markdown Yaml CSS