Does your profile reference $profile or $profile.currentusercurrenthost ?
|
|
Damien
Solodow
|
||||||||||
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntpowershell...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2Bin0fFxfhBsuFoSjfgx9bp4Uuwk-b%3D887JC_jLb9zEKsw%40mail.gmail.com.
Does your profile reference $profile or $profile.currentusercurrenthost ?
Wow, Friday brain strikes. The relevant part of the error is “powershell.config.json”; it’s trying to write that file to store your CurrentUser scoped ExecutionPolicy.
This is a change from Windows PowerShell (aka 5.1) which stored those settings in the registry.
Try this:
test-path (split-path $profile.CurrentUserCurrentHost)
Betting that will be false, and if you create said directory (and make sure you can write to it) the error will vanish.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2Bju6psziZq5-ZNPnRxZVzXLHb5hRyPjKLVGBB4zO7%2BLdw%40mail.gmail.com.
Wow, Friday brain strikes. The relevant part of the error is “powershell.config.json”; it’s trying to write that file to store your CurrentUser scoped ExecutionPolicy.
This is a change from Windows PowerShell (aka 5.1) which stored those settings in the registry.
Try this:
test-path (split-path $profile.CurrentUserCurrentHost)
Betting that will be false,

You don’t have Controlled Folder Access enabled do you?
|
|
Damien
Solodow
|
||||||||||
From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
On Behalf Of Mike Leone
Sent: Tuesday, January 27, 2026 3:18 PM
To: ntpowe...@googlegroups.com
Subject: Re: [ntpowershell] PS v7 can't find part of path of statement in profile?

You don’t have Controlled Folder Access enabled do you?
Are you able to save/create/copy a powershell.config.json file to \\nt_san1\users\MJL-Priv\Documents\PowerShell\ ?
The content you’d need for your execution policy is
{"Microsoft.PowerShell:ExecutionPolicy":"Bypass"}
|
|
Damien
Solodow
|
||||||||||
From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
On Behalf Of Mike Leone
Sent: Tuesday, January 27, 2026 3:24 PM
To: ntpowe...@googlegroups.com
Subject: Re: [ntpowershell] PS v7 can't find part of path of statement in profile?
Also, we don't use MS Defender, we use BitDefender.
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2Bjg814TRveA0cyC8U71jWJ%2Bf0spcGEphExo-r7Nsid1Gg%40mail.gmail.com.
Are you able to save/create/copy a powershell.config.json file to \\nt_san1\users\MJL-Priv\Documents\PowerShell\ ?
The content you’d need for your execution policy is
{"Microsoft.PowerShell:ExecutionPolicy":"Bypass"}
👍🏻
Once you can create/edit that file in that path, your error will go away. 😊
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BiNyJoNtZv%3D0nrDiKGCDyE3AbDYWW6g3eVqCxO%2BDYcZKg%40mail.gmail.com.