Skip to content

$PROFILE on a shared folder gives security warning if remote system has periods in the name #7458

@weloytty

Description

@weloytty

Tested on 6.1.0-preview.4 6.1rc, 6.1 release, and 6.2-preview.1

Steps to reproduce

  1. Have your IT department force sticking your profile on a shared drive.
  2. Ensure your executionpolicy is Unrestricted
  3. Start pwsh

Expected behavior

My profile loads, as it does with 6.0.3

Actual behavior

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                                         
\\Wherever\whatever$\UD3\myusername\My Documents\PowerShell\Microsoft.PowerShell_profile.ps1?        
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"):                                  

If I say [R]un Once, my profile will load, but I will get the same message for every module in my profile.

Environment data

                                                             
$PSVersionTable                    
                                                                
Name                           Value                            
----                           -----                            
PSVersion                      6.1.0-preview.4                  
PSEdition                      Core                             
GitCommitId                    6.1.0-preview.4                  
OS                             Microsoft Windows 10.0.14393     
Platform                       Win32NT                          
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}          
PSRemotingProtocolVersion      2.3                              
SerializationVersion           1.1.0.1                          
WSManStackVersion              3.0                              
                                                                
                                                                            
                                                                            
get-executionpolicy                            
Unrestricted        
                                                        


Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions