I am having trouble using the Unblock-File cmdlet. It will not unblock any file that I specify. Here is an example of what command I am trying to run
Unblock-File -Path "C:\test_file.txt"
First, I check my version of Powershell installed. Check.
PS C:\> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 16299 967
Second, I check sources here and here to make sure I have tried everything suggested to get the file to be unblocked.
I have:
Tried running the
Unblock-File
cmdlet.Tried bypassing execution policy and running with an unrestricted execution policy.
Checked file permissions and properties for the file, and all permissions are available.
Removed
foo.local
from the pathnameRan
-Stream Zone.Identifier
, with no alternate streams found.
Still cannot run the file without a Security Warning popping up. What am I missing here?
PS: I do not have Admin rights to this computer.
EDIT: List of links to try to fix this problem with the New-SelfSignedCertificate -CloneCert $OldCert
command:
http://www.herlitz.nu/2017/11/09/find-certificates-using-powershell/
https://superuser.com/questions/174878/powershell-access-denied-to-cert-currentuser-my
https://www.reddit.com/r/PowerShell/comments/61yt7i/seeking_help_importing_certificates/
https://powershell.org/forums/topic/using-invoke-command-to-import-certificate-gives-access-denied/