none
Start IE by PowerShell all SMB files not accessible RRS feed

  • Question

  • Hi guys

    We deploy our Intranet site by GPO with a "User Log on" action and PowerShell script.

    $IE = New-Object -com internetexplorer.application;
     $IE.visible = $true;
     start-sleep -s 15
     $IE.navigate("http://intranet");
    It's working fine, the IE11 is starting up and the Intranet is showing.

    But all the files we have linked in the Intranet to a Windows Server 2012 R2 share are not working, we get an error when we click on such a link: "Cannot find 'file///X:/PathExample/123.pdf Make sure the path or Internet address is correct."

    The strange thing is, if we close the IE11 and reopen it again with the same PowerShell script, it's working and all files opens just fine. All Users have a mapped drive to this share and the path is correct.

    It also can't be a timing problem that the IE script is starting too early before the drive mapping GPO is applied to the user, because even I increase the"start-sleep -s 15 to 60 seconds, the behaviour is the same. Can't open the linked files, if we close IE and open it again or start the IE PS script again, it's working.

    Any suggestions?

    Thx

    • Edited by wayne7215 Thursday, May 12, 2016 7:37 AM
    Thursday, May 12, 2016 7:36 AM

All replies

  • Hi wayne7215,

    According to your description, I consider that we need to add connecting command in the script, that will do the trick.

    net use /persistent:yes

    To get more information about Net use command, please check the link in the below

    https://technet.microsoft.com/zh-cn/library/bb490717.aspx?f=255&MSPPError=-2147217396

    Hope it will be helpful to you.


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, May 13, 2016 12:45 PM
    Moderator
  • Hi Carl

    I can't see what it has to do with net use, because the drives are already mapped by GPO when the PS script is running to start the IE session. That's why I tried a delay of 60 seconds.

    Could it be that PS script  "$IE = New-Object -com internetexplorer.application" needs a full administrator access token and therefore IE can't access the mapped drives because of UAC?

    On all our Surface with Win10 we haven't this problem and the Links are clickable.

    Probably it's a Win7 security patch we applied in the past few weeks with WSUS.

    Does anyone know if PS on Win7 is starting the IE requires a full administrator access token?

    Friday, May 13, 2016 1:02 PM
  • Hi wayne7215,

    For the command, it’s used to control the use of persistent network connections. I suggest that we could try the fix in the link below.

    https://support.microsoft.com/en-us/kb/2560452

    Hope it will be helpful to you.


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Thursday, May 19, 2016 9:03 AM
    Moderator
  • Hi Carl

    The hotfix you mentioned is from 2011 and the Mrxsmb10.sys and Mrxsmb10.sys files on a patched Windows 7 or Win10  is much more up-to-date. Anyway, that's why we can't apply this old hotfix to our Win7 computers and it's not a solution.

    We have it also with Windows 10 1511, but looks like only those computers which were updated from Win7 or Win8.1 to Win10 because a new computer with Win10 1511 from scratch and all current patches hasn't this problem and all links work just fine.

    Any other suggestions?

    Friday, May 20, 2016 12:06 PM
  • Hi wayne7215,

    According to your description, I suggest that we could keep update. If it doesn’t work, we could try use the process monitor to check.

    https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx?f=255&MSPPError=-2147217396

    Hope it will be helpful to you.


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Wednesday, May 25, 2016 1:07 PM
    Moderator