The Powershell command


ICIT2LOL

Well-known member
Member
VIP
Local time
2:37 AM
Posts
2,122
Location
Central West NSW Australia
OS
Windows 11 Pro 22H2 (OS Build 22621.2361)
I read that the Powershell command is more powerful than the ordinary command prompt and I have been looking at various net sites including the official Microsoft web site but am unable to understand a lot of what the results are telling me. I have on occasion had to use the sfc /scannow and or DISM RestoreHealth command to fix my machines so is PowerShell better than the straight command prompt method?.
So I am open to any information on just what I can run in PowerShell that would be better than the ordinary command prompt as I have seen the forum queries mentioning using PowerShell to fix stuff.
Any help would be really helpful :-)
 
Windows Build/Version
22H2 (OS Build 2261.1778)

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (OS Build 22621.2361)
    Computer type
    Laptop
    Manufacturer/Model
    Asus Vivo notebook X712P
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel CPU graphics
    Sound Card
    N/a
    Monitor(s) Displays
    Generic
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Brave
    Antivirus
    ESET Smart Security
John,

PowerShell makes no difference to running those commands or any other specific commands that can be used in both [PS, Cmd]. It is the commands that matter.

PowerShell is capable of running very sophisticated commands & command scripts that have no equivalent in the command prompt.
It is a well-structured command shell instead of being an unstructured hotch-potch of independent commands that started out decades ago and got modified without any central technical policy in control.
my ditty Batch file and PowerShell guides [post #7] - ElevenForum


All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
PowerShell makes no difference to running those commands or any other specific commands that can be used in both [PS, Cmd]. It is the commands that matter.
Ok Denis I have a better idea of it now I just wanted to make sure that what I have been using - the command prompt wasn't lacking when using the DISM commands. Thanks for your explanation:-)
 

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (OS Build 22621.2361)
    Computer type
    Laptop
    Manufacturer/Model
    Asus Vivo notebook X712P
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel CPU graphics
    Sound Card
    N/a
    Monitor(s) Displays
    Generic
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Brave
    Antivirus
    ESET Smart Security
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Ok Denis I will check out the link you have sent mate but all the same it sort of goes over my head a bit. I did do a little coding back in the Commodore64 days and it took me hours to figure out even simple functions of the computer that is why I said I am not clever enough to do things in the PowerShell mode.
 

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (OS Build 22621.2361)
    Computer type
    Laptop
    Manufacturer/Model
    Asus Vivo notebook X712P
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel CPU graphics
    Sound Card
    N/a
    Monitor(s) Displays
    Generic
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Brave
    Antivirus
    ESET Smart Security
Hey ICIT2LOL!

You might want to check out this on GitHub:


I have been using (sparingly) and updating from GitHub for a while now.
Works as intended.

 

My Computers

System One System Two

  • OS
    windows 11 22631.3447
    Computer type
    Laptop
    Manufacturer/Model
    MSI Raider GE76
    CPU
    Core i9 12th gen 12900HK 2.9 MHz
    Motherboard
    MSI
    Memory
    32 Gigs DDR5-4800
    Graphics Card(s)
    nVidia RTX 3070 Ti / 8 Gigs DDR6
    Sound Card
    DYNAUDIO - Klipsch 2.1 THX - Sound Effects by Nahimic 3
    Monitor(s) Displays
    17.3" 1920 x 1080 360 Hz 3 ms, IPS / Connected to MSI 32 inch curved @ 165 Hz
    Screen Resolution
    1920 x 1080 / Both
    Hard Drives
    Samsung 990 Pro 2TB (OS) - Solidigm P41 2TB (Storage)
    PSU
    280 watts
    Case
    MSI GE series
    Cooling
    internal
    Keyboard
    Steelseries
    Mouse
    G903 Lightspeed
    Internet Speed
    1000 Mbps
    Browser
    Firefox / Opera GX- Do not like Edge
    Antivirus
    Malwarebytes'
    Other Info
    just ask.
  • Operating System
    Windows 10 22H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GT73 7RE VR Titan
    CPU
    Intel Core i7 7820HK 2.9 Ghz
    Motherboard
    MSI
    Memory
    16 Gigs DDR4 2400 Mhz
    Graphics card(s)
    nVidia 1070 8GB RAM
    Sound Card
    DYNAUDIO / Nahimic 2
    Monitor(s) Displays
    IPS / 120HZ
    Screen Resolution
    1920x1080P
    Hard Drives
    Samsung NVME EVO 970 1TB / Samsung SSD (SATA) 1TB
    PSU
    240 watts
    Case
    MSI
    Cooling
    Internal
    Mouse
    Logitech G903 Lightspeed
    Keyboard
    Steelseries
    Internet Speed
    1 Gb/s
    Browser
    Firefox / Vivaldi
    Antivirus
    MalwareBytes'
    Other Info
    none.
John,

I'm quite sure that you do not want to check that thing on GitHub.


All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
John,

I'm quite sure that you do not want to check that thing on GitHub.


All the best,
Denis
An explanation my be helpful right?
 

My Computers

System One System Two

  • OS
    windows 11 22631.3447
    Computer type
    Laptop
    Manufacturer/Model
    MSI Raider GE76
    CPU
    Core i9 12th gen 12900HK 2.9 MHz
    Motherboard
    MSI
    Memory
    32 Gigs DDR5-4800
    Graphics Card(s)
    nVidia RTX 3070 Ti / 8 Gigs DDR6
    Sound Card
    DYNAUDIO - Klipsch 2.1 THX - Sound Effects by Nahimic 3
    Monitor(s) Displays
    17.3" 1920 x 1080 360 Hz 3 ms, IPS / Connected to MSI 32 inch curved @ 165 Hz
    Screen Resolution
    1920 x 1080 / Both
    Hard Drives
    Samsung 990 Pro 2TB (OS) - Solidigm P41 2TB (Storage)
    PSU
    280 watts
    Case
    MSI GE series
    Cooling
    internal
    Keyboard
    Steelseries
    Mouse
    G903 Lightspeed
    Internet Speed
    1000 Mbps
    Browser
    Firefox / Opera GX- Do not like Edge
    Antivirus
    Malwarebytes'
    Other Info
    just ask.
  • Operating System
    Windows 10 22H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GT73 7RE VR Titan
    CPU
    Intel Core i7 7820HK 2.9 Ghz
    Motherboard
    MSI
    Memory
    16 Gigs DDR4 2400 Mhz
    Graphics card(s)
    nVidia 1070 8GB RAM
    Sound Card
    DYNAUDIO / Nahimic 2
    Monitor(s) Displays
    IPS / 120HZ
    Screen Resolution
    1920x1080P
    Hard Drives
    Samsung NVME EVO 970 1TB / Samsung SSD (SATA) 1TB
    PSU
    240 watts
    Case
    MSI
    Cooling
    Internal
    Mouse
    Logitech G903 Lightspeed
    Keyboard
    Steelseries
    Internet Speed
    1 Gb/s
    Browser
    Firefox / Vivaldi
    Antivirus
    MalwareBytes'
    Other Info
    none.
'm quite sure that you do not want to check that thing on GitHub.
Well Denis I had a look but mate it did not make much sense to me with the coding and stuff like that. :confused:
 

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (OS Build 22621.2361)
    Computer type
    Laptop
    Manufacturer/Model
    Asus Vivo notebook X712P
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel CPU graphics
    Sound Card
    N/a
    Monitor(s) Displays
    Generic
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Brave
    Antivirus
    ESET Smart Security
ICIT2LOL,
I too got a Commodore 64, back somewhere around 1980, and found people using it for business, but not very successfully. I started writing business programs for Inventory, AR, AP, and payroll. But the little C-64 was just so dang slow! It just wasn't very good at number crunching.
It was a little bit better after I re-wrote the Kernel ROM, to eliminate all the Tape Commands and Safe Defaults.
Commodore Basic was fairly simple, but when I upgraded to the IBM PC, I learned DOS Batch Language, and started writing DOS color menus, and batch files. I never did learn IBM Basic, MS Basic or any other basic of the day.

There are several things I've wanted to do with my 'puter, that I just can't do in 'DOS Batch', but I've found a few 'Coders' that can do it in Powershell. And I greatly want to thank them for their help!

A command that I can actually run in a Batch file, to empty the Recycle Bin, for instance.

PowerShell Clear-RecycleBin -force -ErrorAction:Ignore

But, I've found out, that I do not want to try to run a DOS Batch command in 'Powershell'.

My own "Cleanup.bat" program wouldn't be what it is today, without the help I've gotten from guys on this Forum.
Thanks Y'all!
TM :cool:
 

My Computer

System One

  • OS
    Win-11/Pro/64, Optimum 11 V5, 23H2 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made w/Gigabyte mobo/DX-10
    CPU
    AMD FX 6350 Six Core
    Motherboard
    Gigabyte, DX-10, GA-78LMT-USB3
    Memory
    Crucial, 16 GB
    Graphics Card(s)
    NVIDEA GeForce 210, 1GB DDR3 Ram.
    Sound Card
    Onboard
    Monitor(s) Displays
    24" Acer
    Screen Resolution
    1280x800
    Hard Drives
    Crucial SSD 500GB, SanDisk 126GB SSD, Toshiba 1TB HD
    PSU
    EVGA 500 W.
    Case
    Pac Man, Mid Tower
    Cooling
    AMD/OEM
    Keyboard
    101 key, Backlit/ Mechanical Switches/
    Mouse
    Logitech USB Wireless M310
    Internet Speed
    Hughes Net speed varies with the weather
    Browser
    Firefox 64x
    Antivirus
    Windows Defender, Super Anti Spyware
    Other Info
    Given to me as DEAD, and irreparable.
    Rebuilt with Gigabyte mobo, AMD cpu, 16GB ram and 500GB Crucial SSD.
I wonder why inbuilt Windows' Powershell can not be upgraded instead of using two versions
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 3Gen Extreme
    CPU
    I7 10750H
    Motherboard
    Intel MW-490
    Memory
    32 GB
    Graphics Card(s)
    Intel UHD - NVIDIA 1650 Ti Max-Q
    Sound Card
    Realtek in-built
    Screen Resolution
    3840x2160 200% Scale
    Hard Drives
    C: WDC PC SN730 SDBQNTY-1T00-1001 (1 TB)
    D: KINGSTON SNV2S2000G (2 TB)
    Antivirus
    BitDefender Free
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo IdeaPad S340 81NB
    CPU
    AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 2.10 GHz
    Motherboard
    LENOVO LNVNB161216
    Memory
    8 GB
    Graphics card(s)
    Radeon Vega Mobile Gfx
    Sound Card
    Realtek
    Screen Resolution
    1366x768
    Hard Drives
    C: SSD 128GB (RPFTJ128PDD2EWX)
    D: HDD 1 TB (Seagate ST1000LM035-1RK172)
    Antivirus
    BitDefender
Both command prompt cmd.exe and powershell have access to all of the binaries on your computer. Beyond that they are very different. cmd is text based with limited logic and variables while powershell is object oriented and can easily leverage the dotNET framework for even more functionality.

I wonder why inbuilt Windows' Powershell can not be upgraded instead of using two versions
To your question Windows Powershell is built on the dotNET framework which is Windows only and hence so is Windows Powershell (ending at 5.2). Microsoft Powershell 6.x and beyond is based on dotNET core which is a open sourced and cross platform (Win, Nix and Mac). It's basically a rewrite of the whole thing
 

My Computer

System One

  • OS
    Windows 11
My own "Cleanup.bat" program wouldn't be what it is today, without the help I've gotten from guys on this Forum.
Ok Techno I am impressed and yes the Commodore was extremely slow and I only got to getting it to draw circles and the like and that is why I have not taken up the cudgel to try and write stuff it is now out of my league. ;-)
 

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (OS Build 22621.2361)
    Computer type
    Laptop
    Manufacturer/Model
    Asus Vivo notebook X712P
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel CPU graphics
    Sound Card
    N/a
    Monitor(s) Displays
    Generic
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Brave
    Antivirus
    ESET Smart Security
At the same time, as I was getting acquainted with the C-64, I was designing and building computers, in the research labs for CAT.
Every day was a new challenge and I loved it. I did all I could to make the lowly little C-64 and it's companion the C-1541 disk drive the very best they could be. That launched me into a very busy computer business.
I've always been about trying to get the very best out of everything I owned, whether a car, motorcycle or computer.
Although I did a lot of programming on the C-64, I did not carry that over to the IBM PC. Other than a few batch files, that is.
 

My Computer

System One

  • OS
    Win-11/Pro/64, Optimum 11 V5, 23H2 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made w/Gigabyte mobo/DX-10
    CPU
    AMD FX 6350 Six Core
    Motherboard
    Gigabyte, DX-10, GA-78LMT-USB3
    Memory
    Crucial, 16 GB
    Graphics Card(s)
    NVIDEA GeForce 210, 1GB DDR3 Ram.
    Sound Card
    Onboard
    Monitor(s) Displays
    24" Acer
    Screen Resolution
    1280x800
    Hard Drives
    Crucial SSD 500GB, SanDisk 126GB SSD, Toshiba 1TB HD
    PSU
    EVGA 500 W.
    Case
    Pac Man, Mid Tower
    Cooling
    AMD/OEM
    Keyboard
    101 key, Backlit/ Mechanical Switches/
    Mouse
    Logitech USB Wireless M310
    Internet Speed
    Hughes Net speed varies with the weather
    Browser
    Firefox 64x
    Antivirus
    Windows Defender, Super Anti Spyware
    Other Info
    Given to me as DEAD, and irreparable.
    Rebuilt with Gigabyte mobo, AMD cpu, 16GB ram and 500GB Crucial SSD.
I've always been about trying to get the very best out of everything I owned, whether a car, motorcycle or computer.
Although I did a lot of programming on the C-64, I did not carry that over to the IBM PC. Other than a few batch files, that is.
Am really impressed TechnoMage sounds like you are a bit of a fix all stuff where possible like myself.
 

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (OS Build 22621.2361)
    Computer type
    Laptop
    Manufacturer/Model
    Asus Vivo notebook X712P
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel CPU graphics
    Sound Card
    N/a
    Monitor(s) Displays
    Generic
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Brave
    Antivirus
    ESET Smart Security
Both command prompt cmd.exe and powershell have access to all of the binaries on your computer. Beyond that they are very different. cmd is text based with limited logic and variables while powershell is object oriented and can easily leverage the dotNET framework for even more functionality.


To your question Windows Powershell is built on the dotNET framework which is Windows only and hence so is Windows Powershell (ending at 5.2). Microsoft Powershell 6.x and beyond is based on dotNET core which is a open sourced and cross platform (Win, Nix and Mac). It's basically a rewrite of the whole thing
Thanks for your answer. Noew it makes sense to me
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad X1 3Gen Extreme
    CPU
    I7 10750H
    Motherboard
    Intel MW-490
    Memory
    32 GB
    Graphics Card(s)
    Intel UHD - NVIDIA 1650 Ti Max-Q
    Sound Card
    Realtek in-built
    Screen Resolution
    3840x2160 200% Scale
    Hard Drives
    C: WDC PC SN730 SDBQNTY-1T00-1001 (1 TB)
    D: KINGSTON SNV2S2000G (2 TB)
    Antivirus
    BitDefender Free
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo IdeaPad S340 81NB
    CPU
    AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 2.10 GHz
    Motherboard
    LENOVO LNVNB161216
    Memory
    8 GB
    Graphics card(s)
    Radeon Vega Mobile Gfx
    Sound Card
    Realtek
    Screen Resolution
    1366x768
    Hard Drives
    C: SSD 128GB (RPFTJ128PDD2EWX)
    D: HDD 1 TB (Seagate ST1000LM035-1RK172)
    Antivirus
    BitDefender

Latest Support Threads

Latest Tutorials

Back
Top Bottom