I am trying out PowerShell 7 (from PowerShell 5.1), and UNC paths/servers that were previously “trusted” by being added to the Local Intranet zone, continue to present security warnings asking for consent to run in PowerShell 7. What is the new way in PS7 to allow scripts to run from UNC paths and avoid this message:
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run <UNC Path>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
What I’ve tried:
There are a few use cases for this:
Any help or references would be appreciated!
Thanks,
-Aakash Shah
Hello! Just a FYI to the group:
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/BYAPR06MB6263CD94667F83EB4F39E167F2D90%40BYAPR06MB6263.namprd06.prod.outlook.com.
Huh. Very interesting.
thanks for posting.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/CADy1Ce5Ak-%3DRXg-qirztKH5H6us6E8enVaTn-%3D4-MFAAv31H6g%40mail.gmail.com.
Wow that is just dumb. All of our references internally are to our DFS which is always a FQDN …
Matthew Houston
System Administrator
> > To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/CADy1Ce6hjs5QjfwS=A6N4RMdT0++KLZiR...@mail.gmail.com.
> >
> > --
> > 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 on the web visit https://groups.google.com/d/msgid/ntpowershell/BYAPR06MB6263159A2A...@BYAPR06MB6263.namprd06.prod.outlook.com.
>
> --
> 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 on the web visit https://groups.google.com/d/msgid/ntpowershell/CADy1Ce4ozRtM2tQf7_pCNEW+BqH-F+=Z8OsjkoJi...@mail.gmail.com.
>
> --
> 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 on the web visit https://groups.google.com/d/msgid/ntpowershell/BYAPR06MB6263274D35...@BYAPR06MB6263.namprd06.prod.outlook.com.
--
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 on the web visit https://groups.google.com/d/msgid/ntpowershell/CADy1Ce69Rc-8o+AvHCzXrLTd...@mail.gmail.com.
--
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 on the web visit https://groups.google.com/d/msgid/ntpowershell/BYAPR06MB6263CD9466...@BYAPR06MB6263.namprd06.prod.outlook.com.