Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

How can I get a Powershell script which maps network drives to execute at logon to any workstation in my domain

$
0
0

I want to map network drives for each user when they logon to any workstation in the network.  I have created and tested the PS1 script which works fine where the drives attach and used persistent parameter.  I have updated the Windows 7 Professional 64-bit workstation to the latest PS 4.0 code.  I have created the GPO and believe everything is assigned properly.  I made changes to allow execution of local and remote signed scripts.  I have forced the changes on a workstation using GPUPDATE /force, but the drives do not connect.  The GPRESULT is as follows which shows the policies are in place as shown below.  

What am I missing to get the script to execute? 

RSOP data for MRC\mikeg on MIDRUBD03 : Logging Mode
----------------------------------------------------

OS Configuration:            Member Workstation
OS Version:                  6.1.7601
Site Name:                   N/A
Roaming Profile:             N/A
Local Profile:               C:\Users\mikeg.MRC
Connected over a slow link?: No


USER SETTINGS
--------------
    CN=My Name,CN=Users,DC=mrc,DC=net
    Last time Group Policy was applied: 7/21/2014 at 8:22:05 AM
    Group Policy was applied from:      MIDSRVR01.mrc.net
    Group Policy slow link threshold:   500 kbps
    Domain Name:                        MRC
    Domain Type:                        Windows 2000

    Applied Group Policy Objects
    -----------------------------
        StartingUp

    The following GPOs were not applied because they were filtered out
    -------------------------------------------------------------------
        Default Domain Policy
            Filtering:  Not Applied (Empty)

        Local Group Policy
            Filtering:  Not Applied (Empty)

    The user is a part of the following security groups
    ---------------------------------------------------
        Domain Admins
        Everyone
        BUILTIN\Administrators
        BUILTIN\Users
        NT AUTHORITY\INTERACTIVE
        CONSOLE LOGON
        NT AUTHORITY\Authenticated Users
        This Organization
        LOCAL
        MRCAdmins
        Domain Users
        Enterprise Admins
        Schema Admins
        AS400_Permanent_Users
        Denied RODC Password Replication Group
        DnsAdmins
        High Mandatory Level

    The user has the following security privileges
    ----------------------------------------------


    Resultant Set Of Policies for User
    -----------------------------------

        Software Installations
        ----------------------
            N/A

        Logon Scripts
        -------------
            GPO: StartingUp
                Name:         C:\Windows\SYSVOL\sysvol\mrc.net\Policies\{47773A6D-1115-4A3D-BB74-F672B315A430}\User\Scr
pts\Logon\MapDriveScript.ps1
                Parameters:
                LastExecuted: This script has not yet been executed.

        Logoff Scripts
        --------------
        Public Key Policies
        -------------------
            N/A

        Administrative Templates
        ------------------------
            GPO: StartingUp
                KeyName:     Software\Policies\Microsoft\Windows\PowerShell\EnableScripts
                Value:       1, 0, 0, 0
                State:       Enabled

            GPO: StartingUp
                KeyName:     Software\Policies\Microsoft\Windows\PowerShell\ExecutionPolicy
                Value:       82, 0, 101, 0, 109, 0, 111, 0, 116, 0, 101, 0, 83, 0, 105, 0, 103, 0, 110, 0, 101, 0, 100,
0, 0, 0
                State:       Enabled

        Folder Redirection
        ------------------
            N/A

        Internet Explorer Browser User Interface
        ----------------------------------------
            N/A

        Internet Explorer Connection
        ----------------------------
            N/A

        Internet Explorer URLs
        ----------------------
            N/A

        Internet Explorer Security
        --------------------------
            N/A

        Internet Explorer Programs
        --------------------------
            N/A


Viewing all articles
Browse latest Browse all 19997

Trending Articles