Create a batch file which points at your .ps1 file. You may be required to run the batch file with elevated permissions, depending on your access levels (the logged in account will be used for execution).
E.g.:
Powershell.exe -executionpolicy remotesigned -File "C:\Path\script.ps1"
If this still isn’t working, please execute your batch file via CMD (copying the path, wrapped in quotation marks, into CMD) and let me know the response.
Related Posts:
- What is the reason for the error message “System cannot find the path specified”?
- ” is not recognized as an internal or external command, operable program or batch file
- ” is not recognized as an internal or external command, operable program or batch file
- Access is denied in windows cmd.Why?
- How to “comment-out” (add comment) in a batch/cmd?
- How do I test if Python is installed on Windows (10), and run an exe to install it if its not installed?
- Windows equivalent to UNIX pwd
- “rm -rf” equivalent for Windows?
- “rm -rf” equivalent for Windows?
- Moving file using cmd?
- How do I kill the process currently using a port on localhost in Windows?
- How to “comment-out” (add comment) in a batch/cmd?
- “if not exist” command in batch file
- “if not exist” command in batch file
- Defining and using a variable in batch file
- How to run PowerShell in CMD
- PHP is not recognized as an internal or external command in command prompt
- Windows 7 – ‘make’ is not recognized as an internal or external command, operable program or batch file
- Ping with timestamp on Windows CLI
- What is the Windows equivalent of the diff command?
- Windows CMD command for accessing usb?
- Command prompt won’t change directory to another drive
- How to extract or unpack an .ab file (Android Backup file)
- Desktop: The system cannot find the specified path
- Changing all files’ extensions in a folder with one command on Windows
- ‘python’ is not recognized as an internal or external command [duplicate]
- PowerShell says “execution of scripts is disabled on this system.”
- How do I start PowerShell from Windows Explorer?
- How to run a PowerShell script
- Install an apk file from command prompt?
- Install an apk file from command prompt?
- How do you comment out code in PowerShell?
- Running a command as Administrator using PowerShell?
- Echo equivalent in PowerShell for script testing
- Echo equivalent in PowerShell for script testing
- What does cmd /C mean?
- How to use the curl command in PowerShell?
- Check if a file exists or not in Windows PowerShell?
- PowerShell and the -contains operator
- Change directory in PowerShell
- Splitting a string into separate variables
- How to split string by string in Powershell
- How to split string by string in Powershell
- Downloading a file with PowerShell
- Terminating a script in PowerShell
- Create an empty file on the commandline in windows (like the linux touch command)
- How to run an EXE file in PowerShell with parameters with spaces and quotes
- How do I pass multiple parameters into a function in PowerShell?
- Terminating a script in PowerShell
- Need to navigate to a folder in command prompt
- How do I create a Batch file to change an exe installer to Win XP SP3 compatibility mode and launch installer
- How do I concatenate strings and variables in PowerShell?
- Array.Add vs +=
- PowerShell and the -contains operator
- The filename, directory name, or volume label syntax is incorrect inside batch
- Powershell: A positional parameter cannot be found that accepts argument “xxx”
- ‘ls’ is not recognized as an internal or external command, operable program or batch file
- PowerShell string interpolation syntax
- BCP error “Unable to open BCP host data-file”
- How to write to the console in PowerShell?
- PowerShell ‘Or’ Statement
- ‘Pip’ is Not Recognized as an Internal or External Command windows 10 CMD
- Copy file remotely with PowerShell
- Read file line by line in PowerShell
- Path to Powershell.exe (v 2.0)
- Azure Powershell Select-AzureSubscription with subscription id
- How to force `findstr` to ignore `Cannot open` returns
- You cannot call a method on a null-valued expression
- Unix tail equivalent command in Windows Powershell
- Equivalent of *Nix ‘which’ command in PowerShell?
- The term ‘Get-ADUser’ is not recognized as the name of a cmdlet
- How to print environment variables to the console in PowerShell?
- What does the “@” symbol do in PowerShell?
- Ternary operator in PowerShell
- xcopy returns error “Invalid number of parameters” when exclude parameter is set
- What is the reason for the CD /D switch in Windows cmd?
- ‘ls’ is not recognized as an internal or external command, operable program or batch file
- ‘openssl’ is not recognized as internal or external command
- Curl not recognized as an internal or external command, operable program or batch file
- Call PowerShell script PS1 from another PS1 script inside Powershell ISE
- Does PowerShell has something like “echo off” and “echo on” trigger?
- Redirecting Output from within Batch file
- LDAP query in PowerShell
- accessing the $args array in powershell
- How do I execute cmd commands through a batch file?
- How does the echo command works in batch programming
- How to split large text file in windows?
- Create Log File in Powershell
- What does the double asterisks mean?
- How do I use spaces in the Command Prompt?
- How to tell PowerShell to wait for each command to end before starting the next?
- How to convert string to integer in PowerShell
- How do I force Robocopy to overwrite files?
- One Powershell Script calling another with parameters
- Concatenate files using PowerShell
- Passing multiple values to a single PowerShell script parameter
- Powershell send-mailmessage – email to multiple recipients
- Sometimes PowerShell stops sending output until I press enter. Why?
- In a PowerShell script, how can I check if I’m running with administrator privileges?
- How to zip/unzip files in Powershell?