Closed inz- closed 1 year ago
the EFI is not mounted and cant be written to. Still strange that it works in Win10 and not Win11. You could do a get-childitem to $SystemVolume.Path and get results in Win10, but same error in Win11. A workaround to this is either to use mountvol (not powershell) or you add the partition access to EFI, with "Add-PartitionAccessPath". Use the $SystemParition variable to add the partition access.
Try using VSCode instead of ISE. I've had issues with ISE and Windows 11 on specific things (this being one of them). However, the code works when running via ConfigMgr or Intune.
For manual Testing, I'd recommend VSCode
Fails in ISE, but works fine in VSCode
This is an ISE issue.
The code works fine, but in Windows 11, there is an issue that ISE sometimes fails to run code where it used to work fine on Windows 10. For Windows 11 testing, please use VSCode.
Looking at this a bit more, using @Lycky's idea to add a drive letter. I was hoping to avoid that, but I think it's the best way to make it work universally.... will be releasing an update hopefully later today
Updates to Proactive Remediation Scripts appear to have resolved the issue in my tests. Please let me know if you continue to have any issues
When running the script on Windows 11, The Copy-Item command throws "Illegal Characters in path"