PowerShell

PowerShell

Application and Data / Languages & Frameworks / Shells
Avatar of reymdoojt
Software Engineer ·

I want to migrate files from Microsoft SharePoint Server to Azure Blob Storage using PowerShell. It seems I got a lot of files not found problems and connection/permission issues. I tried to fetch files from SharePoint Server but turns out to be not working.

Since I don't have the knowledge to evaluate this choice correctly, and since it is fundamental to the success of the project, I wanted to know the community's opinion on the matter.

Thank you :)

READ MORE
5 upvotes·14.6K views

Out of curiosity, when my coding instructor for Python did some commands on his computer, he told me learning any sort of terminal command interface (e.g. GNU Bash, PowerShell, Zsh ) will make me understand systems and how computers work and would make me know the basics of systems programming (although I am more into web development). I immediately went curious, out of my time, and looked up some command line interfaces to learn. It gave me bash, shell, zsh, powershell, etc. All these are really confusing, and they all seem the same. I want to be a terminal dweller, so which of the terminal related things should I learn? I think Bash, since it can replace Powershell on Windows, and has all the Linux/macOS systems.

READ MORE
5 upvotes·38.9K views
Replies (2)
Avatar of cruisen
Astrophysicist / Principal SOE at ESA / ESOC / OPS-OAX, Telespazio VEGA Deutschland·

Well, it is alway a matter of taste.

But to share my own experience, using Unix Shells ever since 1988, and also PowerShell for some period of time. If you want to script Windows OS as an Administrator, PowerShell is a good option. If you want to administer all different kinds of UNIX OS, bash will be available on almost all of them. If you want to develop software and have the freedom to choose, I recommend zsh, better yet oh-my-zsh.

READ MORE
4 upvotes·1 comment·721 views
Yoram Kornatzky
Yoram Kornatzky
·
June 4th 2022 at 3:16PM

Try the Linux kind of shells. Best zsh but bash is also good. They are for Linux and MacOSX. The Windows PowerShell has no use outside Windows. It will expand your understanding of programming. As you will learn the concepts of pipes, input and output redirection, and the general use of command-line tools. It is a must for any serious student of programming and more importantly for programmers in general.

·
Reply
Avatar of jcrben
Escaped Notions·
Recommends
on
GNU Bash
GNU Bash

I use GNU bash - the latest version, currently 5.2 - as my daily driver, on macOS, Linux, and Windows regularly.

I do this because modern bash has features comparable to zsh with the largest community.

On Windows, I use git-for-windows bash which is GNU bash compiled via the msys2 project, which also bundles various GNU/Linux core utilities. If you're using Windows, you should get to know the https://msys2.org/ and https://gitforwindows.org/ projects, which themselves rely on cygwin. Mainly keep in mind the helper cygpath to convert paths back and forth - some things will need Windows style paths.

You can also easily call powershell from bash.

READ MORE
4 upvotes·289 views
Needs advice
on
PowerShellPowerShell
and
PythonPython

I am technical support. I work daily with Windows Server / Exchange, Active directory. I would like to learn scripting and automation to make my life easier. I just started learning PowerShell but not really sure about the correct study path from where I can start. I am taking some courses on Udemy and YouTube. Is it enough?

READ MORE
6 upvotes·151.7K views
Replies (3)
Recommends
on
PowerShell
PowerShell

My first foray into programming was with powershell and it continues to be an enormous help for me in my career (caveat being that I have primarily worked on windows boxes). That being said, PowerShell is a weird language that has some unique syntax and operators that don't translate well to other languages. Python is weird too, but for other reasons (spacing!). I suspect you'll get more immediate benefit spending some time on Powershell since your working in an environment that fully supports the ps toolset.

As for learning, I read "PowerShell Toolmaking in a Month of Lunches" and found that helpful. However, I think your course of study is sufficient. Think the most return for the effort was just messing around in the powershell IDE on my local computer and working the Microsoft documentation.

READ MORE
7 upvotes·1 comment·131.8K views
greg00m
greg00m
·
January 27th 2021 at 5:48AM

I have the same book, it is helpful but doesn’t cover all bases. Joining user groups is a great live action open source place for help.

·
Reply
Avatar of Wittionary
DevOps Engineer at Provisions Group·
Recommends
on
PowerShell
PowerShell

Taking courses on Udemy and YouTube will be helpful I'm sure, but don't neglect the power of practice. If you work largely with Windows right now, pick powershell. Take opportunities to convert the knowledge you already have (example: unlocking an account in Active Directory or adding an email alias in Exchange) from a manual process to a powershell method. Sometimes that's a single cmdlet (Unlock-AdAccount) and sometimes it's a script.

Once you have a good understanding of variables, the pipeline, and foreach loops, you'll be in a position to accelerate your learning. Looking up Microsoft docs is part of the process :)

READ MORE
5 upvotes·1 comment·131.5K views
Travis Travelstead
Travis Travelstead
·
January 27th 2021 at 4:56PM

I would agree with others. If the majority of focus is IT/Support for windows specific devices Powershell would probably give you the most power specifically for windows and your job. If you plan make applications, expand to unix systems, or in general go where Powershell is not then Python would be a good flexible and cross platform option.

I am more of an applications developer that works mostly on unix systems, so Python was my choice and it has worked well. But I understand that Powershell probably has some permissions, access, and functionality that is better suited for your job.

·
Reply
View all (3)

Objective: I am trying to build a custom service that will create VMs in Azure, based on inputs taken from a web interface. I want the backend code that interacts with Azure to be PowerShell.

Ask: Hoping to find help with deciding the simplest architecture of tools to achieve this.

What I have so far with my Limited Knowledge: I am new to Azure and Jenkins. I arrived at Jenkins coz it can run PowerShell and has API that can be called to trigger a job. Although integrating with it over the web seems problematic since its on-prem network. I hear it is possible using the VPN. For the Web, I hope to use Azure Web App with Python/Node.js that I can manage to make API calls to Jenkins.

Is there a better way? I just need help getting the right directions; I will walk the way.

READ MORE
6 upvotes·406.8K views
Replies (3)
Avatar of darthwalsh
Software Engineer at Autodesk·

I'd recommend against using PowerShell as a backend, unless your logic is very simple (maybe less than 100 lines total). I've worked with a huge framework written in PowerShell, and we hit a lot of bugs. (Some of the issues traced back to bugs in the PowerShell runtime itself! Most of the team who owned the PowerShell framework admitted that if they could reimplement it they would pick a different language.) If you're already using Python, then I'd recommend using Python for other backend code -- or a more structured .NET language, like C#.

READ MORE
4 upvotes·3.4K views

If you want to use Azure Web Apps and want to keep it all in one ecosystem then easiest would be to use Azure Devops for the pipelines and Azure Functions to run the PowerShell code. Azure DevOps is a CI/CD platform(and more) kind of like Jenkins but integrated into Azure. And Azure Functions is a serverless thing that can run your code(your PowerShell) on demand without the need to have it hosted on your server. Jenkins can be nice but you will have to host it somewhere. If you want you could use Azure to set up a VM that hosts Jenkins and the website Frontend. Technically if you have the website, it's backend language should be able to execute scripts that are on the same machine so you wouldn't even need Jenkins or another pipeline solution. It would be recommended though for easier management.

READ MORE
4 upvotes·2 comments·12.8K views
Florin Labou
Florin Labou
·
January 20th 2021 at 3:30PM

I would have a look at "infrastructure as code" solutions like Hashicorp Terraform or Ansible from Redhat that support declarative and/or imperative approaches in the provisioning of cloud resources.

·
Reply
Maximilian Hütter
Maximilian Hütter
·
November 4th 2021 at 8:27PM

Going from your original requirement, that you want to build a web interface to provision new Azure VMs, your stack seems to be overly complicated. Why would you need to use Jenkins and Powershell at all? First Jenkins is a Continous Integration Server, you don‘t need it. Second Powershell is a Shell-Script, you can interact with Azure through Powershell but you don‘t need to. As others said, don‘t build your backend service in Powershell, if you can make it work, it will not be maintainable.

You mention you want to build the web interface itself on Python or Node.js, both are fine, just use the one that works best for you. Both allow to you to create a backend service that can make the API-calls to the Azure-API to create your VMs.

·
Reply
View all (3)
Needs advice
on
LinuxLinuxPowerShellPowerShell
and
PythonPython
in

I currently work helpdesk and have been for about 6 years. I am looking to become more valuable, and I can't decide what route to take? Python is of interest, and so is PowerShell. What are some recommendations? Maybe something that would benefit a helpdesk position or even get into a network administrator.

READ MORE
9 upvotes·449.7K views
Replies (5)
Avatar of bryrod
Cloud Engineer at Alteryx·
Recommends
on
PowerShell
PowerShell

I think that if you plan on sticking around enterprise systems and Microsoft, you should definitely get into some PowerShell. Basically anything you do via Active Directory, you should try mirroring it in PowerShell. It’s an easy one to learn, and it’s easy to follow that into Azure CLI. I was in the same boat as you — Did Helpdesk/System Administration for 10 years. PowerShell got me out.

READ MORE
8 upvotes·1 comment·99K views
J St G
J St G
·
October 30th 2020 at 2:51AM

Great, thank you!

·
Reply
Avatar of itpropro
CTO, Senior Cloud Architect at Visorian GmbH·

I would also recommend PowerShell! Since I started learning PowerShell, a lot of possibilities opened up for me, I even became a PowerShell MVP. Since PowerShell Core/6/7 it has gotten a lot of interest in the Linux community and I love it for it's flexibility and possibilities only limited by your imagination ;) Check out the community dashboard to see the current usage https://aka.ms/PSGitHubBI, check out the PowerShell docs at https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7, especially the "Learning PowerShell" section and feel free to contact me for further questions!

PS: Just to be complete on this, I also use Python, but in a very different scope. Python in my opinion is the best for data analytics related tasks or even whole production (web) applications (e.g. with Django). PowerShell is great for automation, orchestration and all the little tasks that makes your everyday life easier.

READ MORE
6 upvotes·99.7K views
View all (5)