Windows 10: Different kinds of Powershell?

Discus and support Different kinds of Powershell? in Windows 10 Support to solve the problem; I've recently used Powershell, but there appear to be several different versions of this utility. Some of them work--some of them merely report not... Discussion in 'Windows 10 Support' started by gogreen, Oct 4, 2015.

  1. gogreen Win User

    Different kinds of Powershell?


    I've recently used Powershell, but there appear to be several different versions of this utility. Some of them work--some of them merely report not being able to find something or call up something else. For instance, when I call up Powershell from an elevated command prompt, Powershell does not let me use a script to retrieve the chkdsk log. However, when I click the search button and bring up Windows Powershell (x86), Powershell appears in a dark-blue window and does work when I paste the same command. And it seems these versions of Powershell are located in different places.



    So what are the differences between these apparent different versions of Powershell?


    :)
     
    gogreen, Oct 4, 2015
    #1

  2. getting all kinds of different BSOD

    What is your computer make and model? If not a branded computer what is your motherboard make and model?



    Please download and run Driver View and upload a copy of the report it produces to your OneDrive. To get a report on all drivers select Edit, Select All followed by File, Save Selected Items. Text file format please, HTML files are less easy
    to work with.

    DriverView: Loaded Windows Drivers List



    Please provide a copy of your System Information file. To access your System Information file select the keyboard shortcut
    Win+R, type msinfo32 and press the ENTER
    key. Select File, Export and give the file a name noting where it is located.
    Files in the txt file format are preferred. Do not place the cursor within the body of the report before exporting the file. The system creates a new System Information file each time system information
    is accessed. You need to allow a minute or two for the file to be fully populated before exporting a copy. Please upload the file to your OneDrive, share with everyone and post a link here.



    For help with OneDrive see paragraph 9.3:

    gerrys template
     
    Gerry C J Cornell, Oct 4, 2015
    #2
  3. DJ3123 Win User
    getting all kinds of different BSOD

    I have been have BSOD issues lately and cant figure out the problem I did a driver verifier test to get mini dumps but I don't know how to read them. can someone help. I have my minidumps here

    https://www.dropbox.com/s/cbhb03czuzn1ji7/dmp.rar?dl=0
     
    DJ3123, Oct 4, 2015
    #3
  4. Kari Win User

    Different kinds of Powershell?

    The reason you can at the moment not run your scripts when running PowerShell (PS) from Command Prompt (CP) is most probably the execution policy set by the system; by default it is restricted. You need to launch the PS in CP with the ExecutionPolicy switch telling what kind of policy you want to be used, for instance Unrestricted. As I have changed the policy earlier, for this screenshot below I deliberately set it first to Restricted to show you an example:

    Different kinds of Powershell? [​IMG]

    • #1 = Checking the current execution policy, noticing it's Restricted. Exiting PS
    • #2 = Launching the PS again, this time setting the policy to Unrestricted
    • #3 = Checking the current execution policy again, now it is Unrestricted.
    The ISE (Integrated Script Editor) version of the PS is just PS on steroids *Wink. You can for example open multiple tabs and do some other stuff not possible in the traditional PS (click the screenshot to enlarge):

    Different kinds of Powershell? [​IMG]


    The x86 versions of PS and PS ISE are what the name says, 32 bit versions made available on 64 bit Windows. Basically they are useless for you, I have difficulties to think even a single scenario where you would need a 32 bit PS instead of a 64 bit in modern Windows.

    By the way, as you are interested in PowerShell, did you know that with it you can install most of your software, install all applications with one command, silently in the background without any user interaction, without any "Click Next", "Click Install", "Click this", "Would you also like to install that" and without any unwanted content being installed? Check the tutorial: PowerShell OneGet - Install Apps from Command Line - Windows 10 Forums
     
    Kari, Oct 5, 2015
    #4
  5. gogreen Win User
    Thank you, Kari, for this explanation. I've set the execution policy to unrestricted (I confirmed that after the initial command wouldn't work), but I can't get this command--get-winevent -FilterHashTable @{logname="Application"; id="1001"}| ?{$_.providername –match "wininit"} | fl timecreated, message | out-file Desktop\CHKDSKResults.txt--to work when I bring up PS from an elevated CP, even with the policy is set to unrestricted. It does work, however, in Powershell ISE (x86) and Powershell x86. Any idea why? Thanks again.
     
    gogreen, Oct 5, 2015
    #5
  6. Mystere Win User
    This is very simple. When you run Powershell in an administrative prompt, your "current directory" defaults to C:\Windows\System32

    When you run it from an icon, it's not running in administrative mode, and the default "current directory" is your user profile..

    There is no "Desktop" directory under C:\Windows\System32, which is what the error is telling you. You're telling it to output to a file that cannot exist because the directory does not exist. There is, however, a desktop directory in your user profile.

    If you look closely at the error, it tells you exactly what the problem is. "DirectoryNotFoundException"
     
    Mystere, Oct 5, 2015
    #6
  7. gogreen Win User
    Thank you, Mystere. So is it then possible to change the directory so that PS works in my administrative prompt? Or do I change the command to reflect the current directory?
     
    gogreen, Oct 5, 2015
    #7
  8. Kari Win User

    Different kinds of Powershell?

    Just edit your command by changing the path where the file will be written. At the end of the command line you have now path as Desktop\CHKDSKResults.txt.

    Change it as you wish, for instance C:\Users\YourUserProfileName\Desktop\CHKDSKResults.txt would write the file to your desktop.
     
    Kari, Oct 5, 2015
    #8
  9. gogreen Win User
    Thanks, Kari. Works perfectly! *Cool
     
    gogreen, Oct 6, 2015
    #9
  10. Kari Win User
    You are welcome *Smile
     
Thema:

Different kinds of Powershell?

Loading...
  1. Different kinds of Powershell? - Similar Threads - Different kinds Powershell

  2. Different $Env:Path on Powershell

    in Windows 10 Gaming
    Different $Env:Path on Powershell: Depending on how I start Powershell the $Env:Path variable is different. Opening from Start is different from the File Explorer context menu Terminal here.Is this by design?vs...
  3. Different $Env:Path on Powershell

    in Windows 10 Software and Apps
    Different $Env:Path on Powershell: Depending on how I start Powershell the $Env:Path variable is different. Opening from Start is different from the File Explorer context menu Terminal here.Is this by design?vs...
  4. What is the different between these kind of systems?

    in Windows 10 Gaming
    What is the different between these kind of systems?: What is the difference between Cross-language Windows 7 and Windows 7? I don't understand! https://answers.microsoft.com/en-us/windows/forum/all/what-is-the-different-between-these-kind-of/43967793-48e3-4f9d-81fc-1f9d43e5a30a
  5. What is the different between these kind of systems?

    in Windows 10 Software and Apps
    What is the different between these kind of systems?: What is the difference between Cross-language Windows 7 and Windows 7? I don't understand! https://answers.microsoft.com/en-us/windows/forum/all/what-is-the-different-between-these-kind-of/43967793-48e3-4f9d-81fc-1f9d43e5a30a
  6. I've been experiencing different kinds of BSODs

    in Windows 10 Gaming
    I've been experiencing different kinds of BSODs: Here are the reports from WhoCrashed: On Wed 10/11/2021 9:31:30 pm your computer crashed or a problem was reportedcrash dump file: C:\Windows\Minidump\111021-10609-01.dmpThis was probably caused by the following module: ntoskrnl.exe nt+0x3F5E40 Bugcheck code: 0xA 0x0, 0xFF,...
  7. I've been experiencing different kinds of BSODs

    in Windows 10 BSOD Crashes and Debugging
    I've been experiencing different kinds of BSODs: Here are the reports from WhoCrashed: On Wed 10/11/2021 9:31:30 pm your computer crashed or a problem was reportedcrash dump file: C:\Windows\Minidump\111021-10609-01.dmpThis was probably caused by the following module: ntoskrnl.exe nt+0x3F5E40 Bugcheck code: 0xA 0x0, 0xFF,...
  8. dont know what kind of ram to get so many different kinds

    in Windows 10 BSOD Crashes and Debugging
    dont know what kind of ram to get so many different kinds: my uncle just helped me to order parts for a new computer and the ram is back ordered so i cancelled it and now i cant get ahold of my uncle i have the mother board the cpu the case the power supply just dont know what ram to get for this board the board i have is AsRock...
  9. changing different kinds of mouses

    in Windows 10 Software and Apps
    changing different kinds of mouses: this will be short. where is the button in the top left corner that lets you change your kinds of mouse https://answers.microsoft.com/en-us/windows/forum/all/changing-different-kinds-of-mouses/19fa057b-66c6-4069-861d-ef4911df5f1d
  10. Different kinds of BSODs, multiple times a day

    in Windows 10 BSOD Crashes and Debugging
    Different kinds of BSODs, multiple times a day: Hello! I'm relatively new here. Just wanted your help because of the numerous BSODs per day that I'm having. Here are my problems: 1. BSOD whenever I unplug or plug my charger 2. BSOD whenever I use Photoshop 3. BSOD (sometimes) when I connect to the internet I...