Script Resource map drive

Welcome Forums DSC (Desired State Configuration) Script Resource map drive

This topic contains 1 reply, has 2 voices, and was last updated by

6 months, 4 weeks ago.

  • Author
  • #110465

    Points: 26
    Rank: Member


    I'm trying to execute a DSC configuration which contains a script resource to map a network drive – this drive is a storage account in Azure.  If i execute the script block outside of DSC it maps the drive as expected,  but with the DSC execution the drive doesn't get mapped. It executes the script block, but i assume because DSC executes under a system account the drive isn;t visible.

    Is there anyway i can execute the script block within DSC under the context of a local user account, or any other way i can get this drive to be persistent across accounts?

    The reason i need this drive mapped, is because once the drive is mapped the dsc script then pulls a load of file/folders from this location, so maybe there is a better way to do this?

    Any help would be really appreciated




  • #110506

    Points: 1,671
    Helping Hand
    Rank: Community Hero

    Yes you can run DSC configuration with different user context. Please go through below documentation.

The topic ‘Script Resource map drive’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort