Windows 10 PowerShell scripts.

  • Thread starter Deleted member 88301
  • Start date
D

Deleted member 88301

Guest
Hello.

I haven't used Powershell(Admin) much in Win 10. I vacillate between it and Command Prompt(Admin). I'm just curious as to what I can do with scripts. I honestly don't know. Automation?

Thanks in advance.

Wyo
 

SuperSubZero

2[H]4U
Joined
Nov 21, 2000
Messages
3,626
It's a scripting language geared for Windows. The scripts can do whatever they are written to do. I handle computer deployments at work, and I have Powershell scripts to do stuff like activate Windows, tweak system settings, and it can also change the volume, because Windows 10 defaults to 60% volume which is just way too loud.
 

B00nie

Supreme [H]ardness
Joined
Nov 1, 2012
Messages
8,190
The most used powershell tool for me is the Test-Netconnection, handy for checking if certain ports are open or firewalled.
 

Biznatch

2[H]4U
Joined
Nov 16, 2009
Messages
2,224
Powershell in win10 can do pretty much ANYTHING on the machine..... There are also packages you can install that bring that functionality to other MS products like SQL. Honestly you will be the limiting factor in powershell until you spend some time learning it and what you can do with it, but it is INCREDIBLY powerful on a windows box.

PS also responds to all of the old console commands, so there's literally no reason to ever open CMD again. Hell it even interprets most bash commands as well.

If you want to really take it to the next level, get a 3rd party app like CMDer and customize that. I'm almost annoyed when I have to touch a mouse now after changing my whole workflow.
 
  • Like
Reactions: muz_j
like this

B00nie

Supreme [H]ardness
Joined
Nov 1, 2012
Messages
8,190
Powershell in win10 can do pretty much ANYTHING on the machine..... There are also packages you can install that bring that functionality to other MS products like SQL. Honestly you will be the limiting factor in powershell until you spend some time learning it and what you can do with it, but it is INCREDIBLY powerful on a windows box.

PS also responds to all of the old console commands, so there's literally no reason to ever open CMD again. Hell it even interprets most bash commands as well.

If you want to really take it to the next level, get a 3rd party app like CMDer and customize that. I'm almost annoyed when I have to touch a mouse now after changing my whole workflow.
I don't know who you directed this message to - but my use of powershell is limited to the rare occasions I have to troubleshoot a customers Windows system. We're 100% linux/osx - well and a virtual windows that can be booted when needed.
 

muz_j

Limp Gawd
Joined
Jul 13, 2014
Messages
227
I don't know who you directed this message to - but my use of powershell is limited to the rare occasions I have to troubleshoot a customers Windows system. We're 100% linux/osx - well and a virtual windows that can be booted when needed.
...so basically you don't use PowerShell for much at all.... thanks. lol
 

B00nie

Supreme [H]ardness
Joined
Nov 1, 2012
Messages
8,190
...so basically you don't use PowerShell for much at all.... thanks. lol
Only when I need to do something special on a customers workstation (such as check if a network port is open).
 

chockomonkey

[H]F Junkie
Joined
Oct 11, 2003
Messages
8,277
Powershell in win10 can do pretty much ANYTHING on the machine..... There are also packages you can install that bring that functionality to other MS products like SQL. Honestly you will be the limiting factor in powershell until you spend some time learning it and what you can do with it, but it is INCREDIBLY powerful on a windows box.

PS also responds to all of the old console commands, so there's literally no reason to ever open CMD again. Hell it even interprets most bash commands as well.

If you want to really take it to the next level, get a 3rd party app like CMDer and customize that. I'm almost annoyed when I have to touch a mouse now after changing my whole workflow.
Yeah I've seen my buddy do all sorts of cool shit with it.

I've tried before, but gave up. Unlike other software libraries I'm used to using (in the python world) it's incredibly confusing for me trying to decipher why certain cmdlets aren't available and why, and which version of the api I'm reading. I'm not sure why they make it so difficult lol just tell me the version I'm using and provide us with something like pip to install missing cmdlets!
 

Biznatch

2[H]4U
Joined
Nov 16, 2009
Messages
2,224
Yeah I've seen my buddy do all sorts of cool shit with it.

I've tried before, but gave up. Unlike other software libraries I'm used to using (in the python world) it's incredibly confusing for me trying to decipher why certain cmdlets aren't available and why, and which version of the api I'm reading. I'm not sure why they make it so difficult lol just tell me the version I'm using and provide us with something like pip to install missing cmdlets!

It is much easier than pip... Pip can destroy your life quite easily and take hours to figure out why. Still use it all the time though as a lot of my work is done in python.

PS should be much easier. The doc page's are usually speicific to the module, so you know you'll need to import that first. If you try and import a module you don't have installed, it tell you to install the module. I've never had any version issues with anything in powershell, so I'm not sure what you were trying to do. I will admit, MS documentation is quite the cluster fuck and can take a while to find the info you're looking for. Github/Stackexchange are good sources to find scripts from other people doing something similar to help understand what it's doing and why. Just gotta dive in and it will start making sense eventually.
 

chockomonkey

[H]F Junkie
Joined
Oct 11, 2003
Messages
8,277
It is much easier than pip... Pip can destroy your life quite easily and take hours to figure out why. Still use it all the time though as a lot of my work is done in python.

PS should be much easier. The doc page's are usually speicific to the module, so you know you'll need to import that first. If you try and import a module you don't have installed, it tell you to install the module. I've never had any version issues with anything in powershell, so I'm not sure what you were trying to do. I will admit, MS documentation is quite the cluster fuck and can take a while to find the info you're looking for. Github/Stackexchange are good sources to find scripts from other people doing something similar to help understand what it's doing and why. Just gotta dive in and it will start making sense eventually.
Oh I'm sure my poor experience was due to my limited knowledge and time with it, since I remember having all sorts of aimsimi headaches when I began coding in python.

I was trying to automate some SQL backups in ps, and no matter what I tried I could not get the proper cmdlets available for use. It was awhile ago though so I don't recall exactly the issues, just that I gave up in frustration lol
 
Top