FG
💻 Software

Powershell Access to the path denied

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

Problem

I'm sure this has been asked a million times, but I can't figure out why I can't run this simple command in powershell: I am forever getting the following error: Anyway, I've tried ALL of the following, to no avail: Running powershell as Administrator (i.e, "Run as Administrator") Set-ExecutionPoli…

Error Output

PS> new-item -path c:\users\me\desktop\testfolder -name (get-date).txt -value (get-date).toString() -itemtype file

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Powershell Access to the path denied

Low Risk

The the DateTime string format returned by contains characters that can't be used for file names. Try something like this: Just change the format string to meet your needs.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment