Developing on Windows 10 in 2019

What’s the main difference between powershell and cmd?

A colleague of mine mentioned the resource usage, but was too vague…

1 Like

Age :wink: :joy:

But seriously, PowerShell is a shell that uses object oriented programming, primarily for automating tasks. Command Prompt is a shell to execute Windows commands, with limited automation features. PowerShell resource usage is a bit heavier, and it works differently when thinking about CMD or Bash. However, if you can think of it, it has been done with PowerShell:

  • Interfacing with Windows Functions/System Calls
  • Automating backups, snapshots, and testing restoring backups
  • Serverless/Function as a Service Programming
  • Deploying software across a cluster of Windows servers
  • Provisioning infrastructure
  • Developer tools to make web/app/DB calls
  • Malicious Software/Penetration Testing tools
  • Pet Food Dispenser application
3 Likes

CMD vs Powershell is like going from using DOS to using Windows 10.

You cant really compare them because they are totally different animals that do very different things.

1 Like

There is also this https://sdkman.io/

Specifically for that purpose of installing, setting up, jumping between sdk versions like Java. It does some things like properly setup JAVA_HOME by itself, probably does make sure your public node_modules directory is one you actually have permissions on and so forth.

Im not perfectly sure its better or worse than choco. But choco is more an attemt on a package manager for windows like we have it on linux. Where as this is specifically meant to manage sdks for developement and do nothing else and is cross platform.

People even use it on Linux and there we have a package manager already.


Personally, I have only used it once to install a kotlin cli compiler for quick testing of little code snippets outside of projects. So, cant tell you much about it other than it sure was more convinient than downloading the binary blob.

They dont really have a repo for it. The wiki tells you to use brew or sdkman.

That admin part is probably because of your node_modules public directory. When you npm -g install you often end up needing root or admin permissions unless you specified a folder for your user in like your home directory where you should not ever have such problem as your -g directory.

I had this problem too pretty frequently until I figured that out.

Why you had to delete your lock file I dont really know either (nobody really ever does I guess). Since its purpose is to consistently install the same packages in the same order if you can reproduce the error using the same package-lock relieably, then assuming its not a broken file, then it’s a bug you could report.

Good advice. Picked this up last night:

image

Docker on Windows Server Core looks like a really promising way to deal with shitty old ASP apps sat in a DC that is planned for closure but no one wants to spend money refactoring/rewriting. Got to love the SQL Server compatibility levels as well, really helps wit the “but our app is only supported on SQL Server 2008” negativity. Not to mention the ability to route traffic from VM’s in Azure directly to Azure SQL DB without exposing it to the public internet if you are fortunate enough that nothing inside the database needs full fat SQL Server. Sometimes Microsoft gets it right :slight_smile:

2 Likes

I wonder has anybody tried container instances on azure? Or some kubernetes/whatever the h3ll they have. I tried to deploy a static website to a container instance and protect it by oauthproxy that authenticates with azure ad. But I ended up in the end spinning up a VM and installing everything there, because in container instance you seemingly

  • cannot remap ports, so you NEED custom built containers. If your server inside the container does not expose the exact port you need, like 443 and 80
  • somehow I didnt manage to map a config file from a file share to a path and another config file to another path in the same file share, because somehow it only seems to give you the option to mount an ENTIRE file share to a path. Not contents of it. So I would have ended up with three file shares, witch are 15 lines of json in that damn json file.
  • It also does not help that it cant automagically do https, so there is your 3rd container. Unless, Im building a custom container for it.

I dont really have a big problem with it. But where I work people are pretty opposed to VMs as they appearently had a pretty bad experience managing their VMs. So I tried to find other solutions for it. But in the end I didnt really get anywhere with it (in a reasonable timeframe for the task). Now we have a VM that I think in theory it should not really need real maintenance. In practice, lets wait and see… :joy:

Much easier when you can just deploy your static sites to the public. The storage account itself just does that. But since we need authentication that’s not a thing. Im guessing its a rare usecase. But that’s not the point. The container instance limitations are strange af to me.

1 Like

We had this exact same problem, people were doing all sorts of crazy shit when we first allowed self-managed resource groups for product teams who were bitching about how slow central IT was at getting them dev environments. The consequences of obeying the JFDI command that came down the mountain was:

  • Linux VM’s with port 22 exposed on public IP’s with only passwords required for auth.

  • Windows VM’s with port 3389 exposed on public IP’s. The slack jawed window licking devs that deployed them thought ‘football1234’ was a strong password :roll_eyes:

  • Messages from Microsoft that maybe someone who knows what they are doing should go check the aforementioned VM’s cos it looks like they have bots running inside them trying to brute force other things :grimacing:

  • SQL Datawarehouses deployed like they cost only a penny to run

  • Comsos DB’s everywhere, cos it supports the Mongo API (which is still uber cool if you stopped learning in 2011) and the users in the US might just need that data in Europe and India.

  • Incidents of people running a pipeline with incorrect parameters and refreshing their test environment, so that all data was gone :joy:

Today we have rules - you want VM’s? They go into managed Resource Groups where grown ups can make sure they are looked after and secure. Azure Container Instances or AKS are also blocked by policy. There are some managed k8’s cluster the product teams can ask for their stuff to be hosted.

4 Likes

Port 22 is open for the VM I made too. But the first thing that happened in the setup process was it asked me for a ssh key (in the azure ui). I gave it a ssh key. There literally is no password that was ever setup. So, like unless you hack ssh entierly (in which case I would suggest you hack another site where there is more in it for you :stuck_out_tongue:) I don´t think you are getting in that easiely threw that.

2 Likes

Ok, last time I’ll post here.

Installed windows pro on desktop, got to set everything up, it worked flawlessly, great, amazing. Powershell is awesome, wizards/installers are also awesome (I’m not being sarcastic, I liked them), didn’t install chocolatey after all.

Don’t know if something happens after some time without registrating, but so far the only thing going was the overlay text and not being able to “customize my windows”, like, changing wallpaper and stuff (which is ok).

Wireless worked perfectly after installing manufacturer’s drivers and my rgb mouse was cycling through all the colors again. VS Code ran even better than ever.

But I’m sorry… I missed debs more than anything and switched back :’(

Yes, you can develop on windows, absolutely, and Windows 10 is a pretty solid and nice OS (I was very wrong about my old assumptions). When I get to buy a new pc/laptop I’ll get an original windows copy and will give it a try, will make the NT world mine… but I can’t… and missed apt more than I thought I would.

Sorry but I tried. Won’t ever talk shit on W10 again.

6 Likes

No need for that :wink:

Hey man, we’re here for Linux, Windows, ChromeOS, Android, MacOS, et al. users. All we ask for is you come in with an open mind, which you have done. It is much appreciated! Enjoy your engineering endeavors!

6 Likes

This is what choices are for. Kudos for trying!

2 Likes

@AnotherDev behold!

4 Likes

Niiiice man. Depending on your reading ability/retention plus time to practice I’d say you’ll be up to speed in 50 - 60 days.

Talked to the IT guy at work, he said that if the IT manager found out I was playing with Powershell at work they’d go nuclear.

I guess it’s a good thing they are not my boss?

Powershell, eventually!™

2 Likes

I own both of those too. I hope you actually get around to reading them, the contents looks great.

#must read the books I buy.
#must read the books I buy.
#must read the books I buy.
#must read the books I buy.
#must read the books I buy…

1 Like

They probably think that means you’ll go find a new job.

Step one before I buy, download PDF “preview” ( :wink: ) and read through to make sure I’m interested.

This is a real problem, PowerShell is so useful that the kinds of people who used to sit in finance and write Excel macros now learn PowerShell and then start asking for rights to be able to do stuff. I’ve seen some pretty awesome hacked together stuff prepping data for users PowerBI workbooks. It’s the new illegal server sitting under a desk IT doesn’t know about - until it breaks and the big boss doesn’t get the report she’s come to depend on, and then suddenly it’s IT’s problem. Yeah, thanks Microsoft :stuck_out_tongue:

1 Like

But, this is the problem. I read the preview, think wow, this book is awesome. Buy the ebook (cos there is usually a coupon, voucher or promo running) and before you know it there’s over 150 ebooks in your google library, not to mention kobo and Amazon… (admittedly, humble bundle accounts for a good chunk of this) but I think I am an addict.

One day I will learn all the IT :smiley: (it will never, ever happen)

1 Like

When you read SSH Mastery, please make a thread/review :wink:

Also Jenkins 2 Up & Running was underwhelming.

1 Like