John Z
John Z

Reputation: 21

WIndows powershel ps1 file extension not being recongized

I am trying to run a powershell script on windows. I wrote the script in notepad and saved it .ps1. However, the property of the file remains txt. I dont know what I am doing wrong.

I tried to run the file even though it is a txt extension, and it does not work from powershell.

Upvotes: -1

Views: 72

Answers (1)

Sujay27
Sujay27

Reputation: 11

From File Explorer, navigate to View tab and select the check box of 'File name extensions'. After enabling this option, you will be able to see the file extensions. Then select your PowerShell file, rename and remove the .txt extension.

I attached screenshot for your reference:

Screenshot

Upvotes: 1

Related Questions