asheroto / BlockFolderWindowsFirewall

Block all EXEs in a specified folder in Windows Firewall.

Home Page:https://bit.ly/BlockFolderWindowsFirewall

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The term x86 is not recognized

Atulin opened this issue · comments

> BlockFolderWindowsFirewall.ps1 -Path "C:/Program Files (x86)/Some Files/Folder" -Recurse
x86: The term 'x86' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Hmm.. Not sure why this is happening. It's working for me...

image

Tried it with both backslash and forward slash.

I tried it in PowerShell 5 and PowerShell 7 with the same result. Are you perhaps running the script in a manner that would modify the way the parameter values are interpreted?

I'm assuming you're using the latest version, right?

Yes. Latest version, Powershell 7.4.1 in Windows Terminal. I did not call it from an elevated terminal, though, maybe that could be the issue.

Yeah, I bet that's the reason. In the later versions of Windows, you generally have to Run as Administrator to work with files in C:\Program Files, C:\Program Files (x86) and C:\Windows.

I'm going to go ahead and close the ticket but if for some reason you find a bug let me know.