FG
💻 Software

Running Windows Powershell Scripts simply opens it in the editor

Fresh5 days ago
Mar 15, 202650086 views
Confidence Score0%
0%

Problem

I have a Windows powershell script that works fine in the interactive editor. The script is a simple one line sql cmd: When I enter that at the powershell command prompt it works fine. I save it in a ps1 file and try to run it from the cmd prompt by typing .\filename.ps1, it opens it in Notepad, an…

Error Output

sqlcmd -S servername -d dbname -E -W -w 999 -s "," -Q "SELECT select col1,col2,'','','','','','','','','','','','','','','','','','','','','','','','…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Running Windows Powershell Scripts simply opens it in the editor

Low Risk

Run Change the value of the attribute to . The possible values are following: - execute, - Open in PowerShell ISE, - open in Notepad. For security reasons Microsoft set the default action to .

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment