powershell v admin cmd prompt


  1. Posts : 103
    10
       #1

    powershell v admin cmd prompt


    so differences are very technical and i dont understand any of this: What is the difference between CMD and Powershell? - Quora

    but basically just wanted to know

    1. what does fully admin elevated cmd prompt Commonly do that powershell doesnt ?
    2. does powershell do all common things admin cmd prompt does ?
    3. if it does, then why doesnt ps do /ipconfig ? cos tried it and it didnt work...
      My Computer


  2. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #2

    PowerShell is a properly designed programming scheme.
    Windows commands used in the Command prompt & in batch files are a collection of individual commands with no unifying policy, no version identification let alone version control and precious little up-to-date documentation.

    Elevation means the same in both - elevation [Admin permission to proceed] is required for any command that has the ability to affect other users of the computer.

    PowerShell is much more capable than Command prompt commands.
    - PowerShell has it own commands but it can also run most of the commands you might use in a Command window. But there is no documentation about which ones work - the only way to find out is to try them.
    - I have just run ipconfig in a Command window and then in a PowerShell window. It worked in both and gave the same response in both.

    If you are going to spend time & effort studying one of them, make it PowerShell. I can post some links to guides if you want.

    Denis
      My Computer


  3. Posts : 103
    10
    Thread Starter
       #3

    Try3 said:
    PowerShell does most of the commands of cmd prompt
    ps has it's own commands
    oh ok thx that is the important part to know

    looks like needed a space before /

    ipconfig /all

    but in cmd prompt you can do

    ipconfig/all

    and it still works so that was the problem was #3

    another key problem is all the tech support sites on web is showing cmd prompt stuff, that makes using powershell hard to use,
    but since it does 'most' like.. 90%... i guess it should be fine in future, guess willl find out over time
      My Computer

  4.   My Computer


  5. Posts : 31,691
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #5

    helpfixcomputer said:
    ...another key problem is all the tech support sites on web is showing cmd prompt stuff, that makes using powershell hard to use...
    As has been said above, 'Elevated' just means that it has been 'run as administrator' and has the permissions that go with that.


    If you want to switch a Powershell window to being a Command prompt, just type CMD and hit the Enter key. When you want to switch back type EXIT. It works the other way too, you can equally well type Powershell in a Command Prompt window to switch it to Powershell.


    powershell v admin cmd prompt-image.png powershell v admin cmd prompt-image.png
      My Computers


  6. Posts : 1,746
    Windows 10 Pro x64 22H2
       #6

    In addition:

    1. Doing something in powershell is much easier and requires less effort and less writing.
    2. You can use .NET types and classes in powershell which makes powershell programming language if you want.
    3. powershell and .NET documentation is easier to follow, there are many tutorials and samples, so easier to learn
    4. powershell "core" is cross platform, CMD is windows only
    5. you can debug powershell code, dealing with errors is much easier
    6. powershell is constantly updated with new features, CMD isn't

    what does fully admin elevated cmd prompt Commonly do that powershell doesnt ?
    not sure for cmd but there are gotchas, ex. you can't take ownership with elevated powershell if you have no permissions to do so, but there are workarounds to grant higher privileges to powershell process once it's elevated.

    does powershell do all common things admin cmd prompt does ?
    yes, at a minimum it can do all that + many other things which would take significant effort with cmd many of which not possible at all.
      My Computer


  7. Posts : 41,481
    windows 10 professional version 1607 build 14393.969 64 bit
       #7

    These are commands that are commonly run in the BSOD forum:

    1) Open administrative command prompt (ACP) and type or copy and paste:
    2) sfc /scannow
    3) dism /online /cleanup-image /scanhealth
    4) dism /online /cleanup-image /restorehealth
    5) sfc /scannow
    6) chkdsk /scan
    7) wmic recoveros set autoreboot = false
    8) wmic recoveros set DebugInfoType = 7
    9) wmic recoveros get autoreboot
    10) wmic recoveros get DebugInfoType
    11) bcdedit /enum {badmemory}

    12) When these have completed > right click on the top bar or title bar of the administrative command prompt box > left click on edit then select all > right click on the top bar again > left click on edit then copy > paste into the thread

    Use this link as needed when posting results:
    How to Change Post Editor to Source or WYSIWYG Mode at TenForums.com



    Some OP attempt to run the commands using PS.

    All except the bcedit commands work with either ACP or PS.

    The bcdedit command would need to be modified to run in PS.
      My Computer


  8. Posts : 103
    10
    Thread Starter
       #8

    good info here if anyone needs it keep ref
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:32.
Find Us




Windows 10 Forums