Windows 10: Can you help me run this PS1 from a batch

Discus and support Can you help me run this PS1 from a batch in Windows 10 Performance & Maintenance to solve the problem; Hello. I want to make this ps1 script execute from an batch file : It's named "enable-all-advanced-power-settings.ps1" Enable all advanced power... Discussion in 'Windows 10 Performance & Maintenance' started by vigan1, Aug 29, 2020.

  1. vigan1 Win User

    Can you help me run this PS1 from a batch


    Hello.
    I want to make this ps1 script execute from an batch file :
    It's named "enable-all-advanced-power-settings.ps1"
    Enable all advanced power settings in Windows. . GitHub

    Code:
    I put "enable-all-advanced-power-settings.ps1" in the same folder as my .bat.
    My batch file contain this code, but the ps1 script need more priviledges to run :

    Code:
    But I can't get it to work, when I run the .bat as administrator or not !
    Powershell is launched, but it can't run, here's a photo :
    https://i.stack.imgur.com/51Wd8.png

    Can someone try it on their system or tell me how to do it ?
    Thank you.

    :)
     
    vigan1, Aug 29, 2020
    #1

  2. Is schedule job running DisableUnusedSmb1.ps1 normal?

    Dears,

    Recently I found a schedule job running on my Windows 10 version 1809 machines.

    It is trying to run powershell with the following parameters. Is this normal?

    -ExecutionPolicy Unrestricted -NonInteractive -NoProfile -WindowStyle Hidden

    C:\Windows\system32\WindowsPowerShellv1.0\Modules\SmbShare\DisableUnusedSmb1.ps1 -Scenario Server

    Thank you and Regards,

    Leo
     
    Leo Leung (leo.leung), Aug 29, 2020
    #2
  3. phrab Win User
    Syntax for Batch file &/or powershell script to run multiple commands

    Thanks for your reply & suggestion. I'm able to get Powershell to run as admin. But I don't know the syntax for the batch file.

    I tried:

    Code:
    but that doesn't work.
     
    phrab, Aug 29, 2020
    #3
  4. djmcnz Win User

    Can you help me run this PS1 from a batch

    running DOS as ADMIN

    I assume you don't have 'exit' anywhere in your batch file?

    Rather than playing with 'pause' - if you want to see the output...

    1. Open a command window as admin
    2. Run the batch file manually
    3. Command window will not close unless the 'exit' command is issued
    4. Read output
    That's the first step I'd take to diagnose. Then run every line in your batch file manually, one-by-one, in your admin command window (copy and paste from the actual batch file, don't retype the commands).

    You'll soon find your problem.
     
    djmcnz, Aug 29, 2020
    #4
Thema:

Can you help me run this PS1 from a batch

Loading...
  1. Can you help me run this PS1 from a batch - Similar Threads - help run PS1

  2. Can you help me

    in Windows 10 Gaming
    Can you help me: I got a usb drive mailed to my deceased father. Withput thinking i shoved it into my computer and all of a sudden i was unable to loggin with the passwor. Its now asking me to type in a phrase. I have not typed in the phrase. I put the computer in airplane mode, i took it off...
  3. Can you help me

    in Windows 10 Installation and Upgrade
    Can you help me: I got a usb drive mailed to my deceased father. Withput thinking i shoved it into my computer and all of a sudden i was unable to loggin with the passwor. Its now asking me to type in a phrase. I have not typed in the phrase. I put the computer in airplane mode, i took it off...
  4. can you help me

    in Windows 10 Customization
    can you help me: I changed my display in bios to UEFI from legacy in hopes to enable secure boot but it never worked, now when I turn my pc off and on my screen is black https://answers.microsoft.com/en-us/windows/forum/all/can-you-help-me/078300b5-113d-4fe6-b8aa-611b20f2af5c
  5. can you help me?

    in Windows 10 Software and Apps
    can you help me?: on my work computer, because the screen lock pin was entered incorrectly 3 times, it asks to enter A1B2C3, but the keyboard language is Russian and does not change in any way. Please help me....
  6. Can you help me?

    in Windows 10 Software and Apps
    Can you help me?: I'm trying to install Virtualbox from Oracle and getting this message. But I'm unsure if you can help me because it is not a Microsoft product. If you can't, then just let me know.Look forward to hearing your response....
  7. Can you help me?

    in Windows 10 Gaming
    Can you help me?: I'm trying to install Virtualbox from Oracle and getting this message. But I'm unsure if you can help me because it is not a Microsoft product. If you can't, then just let me know.Look forward to hearing your response....
  8. can you help me with this?

    in Windows 10 Software and Apps
    can you help me with this?: I asked many questions here :https://answers.microsoft.com/en-us/windows/forum/all/i-can-t-fix-issues-with-my-graphics-card/2f5e31b2-b780-4497-937b-2bb4055a3984?page=1but nothing worked."display driver stopped responding and has recovered. Display driver AMD driver stopped...
  9. can you help me

    in Windows 10 Customization
    can you help me: can you help me figure why my computer not 100 percent it is only 95 percent https://answers.microsoft.com/en-us/windows/forum/all/can-you-help-me/87ccddc5-3345-4cd9-9769-57a90e575cee
  10. Can you help me ?

    in Windows 10 Ask Insider
    Can you help me ?: [ATTACH] submitted by /u/rasquiMT [link] [comments] https://www.reddit.com/r/Windows10/comments/h8a7x7/can_you_help_me/