About 323,000 results
Open links in new tab
  1. How to run powershell script from .ps1 file? - Stack Overflow

    Oct 23, 2019 · I'm trying to automate the execution of a simple PS script (to delete a certain .txt file). Obviously, I'm new to powershell :) When I run the code in shell, it works flawless. But when i save …

  2. windows - How to run a PowerShell script - Stack Overflow

    How do I run a PowerShell script? I have a script named myscript.ps1 I have all the necessary frameworks installed I set that execution policy thing I have followed the instructions on this MSDN help

  3. Call PowerShell script PS1 from another PS1 script inside Powershell ...

    I want call execution for a myScript1.ps1 script inside a second myScript2.ps1 script inside Powershell ISE. The following code inside MyScript2.ps1, works fine from Powershell Administration, but...

  4. How to fix "running scripts is disabled on this system"?

    Nov 1, 2020 · This is because of Execution Policy. This defines how powershell scripts will run. In Default windows desktops, it is Restricted, not allowing any scripts (signed or unsigned) only …

  5. Windows Powershell policy execution bypass - Stack Overflow

    Apr 26, 2021 · In order to permanently change the execution policy, you need to run your powershell or registry change elevated, i.e Run as administrator. Additionally, you may have to modify your …

  6. How to uninstall a .ps1 file installed with Powershell

    Feb 29, 2024 · you need to look at the contents of the ps1 file, and figure out manually how to undo whatever it did. There's no systematic way to undo what a powershell script changes. If you're lucky, …

  7. dot source - In PowerShell, how do I define a function in a file and ...

    May 16, 2011 · I have a .ps1 file in which I want to define custom functions. Imagine the file is called MyFunctions.ps1, and the content is as follows: Write-Host "Installing functions" function A1 { Write...

  8. Why are my PowerShell scripts not running? - Stack Overflow

    Aug 14, 2008 · This is a fairly terrifying answer. For one, it permanently changes Powershell's default security level in possibly undesirable (and insecure) ways. For another, it fails to even adequately …

  9. How can I pass an argument to a PowerShell script?

    I have a batch script which runs a ps1 file but with a profile. That profile.ps1 outputs text when it loads. In some scripts, I want to disable the output of that text if I don't need it. For that, I created some simple …

  10. What is the purpose of the *.psm1 files in a Powershell module?

    Apr 27, 2019 · Note that if you were to use a regular *.ps1 script directly in RootModule, its definitions would be loaded into the caller's scope, not the module's; that is, you would lose the benefits of a …