Skip to content

can't find new drive #3

@jrudley

Description

@jrudley

When running a dsc script that formats and brings a new drive online, cntfsaccesscontrol throws an exception that the drive is not exist. If you rerun the dsc script, it works.
xWaitforDisk Disk1
{
DiskNumber = 1
RetryIntervalSec =$RetryIntervalSec
RetryCount = $RetryCount
}

    xDisk DataDisk
    {
        DiskNumber = 1
        DriveLetter = "S"
    }

Cannot find drive. A drive with the name 'S' does not exist.
+ CategoryInfo : ObjectNotFound: (S:) [], CimException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetAclCommand
+ PSComputerName : localhost

  cNtfsPermissionEntry websitePermIUSR
{
    Ensure = 'Present'
    #Path = "$iisInstallPath\$IisFolderName\website"
    Path = 'S:\inetpub\wwwroot\prod\website'
    Principal = 'IUSR'
    AccessControlInformation = @(
        cNtfsAccessControlInformation
        {
            AccessControlType = 'Allow'
            FileSystemRights = 'Read'
            Inheritance = 'ThisFolderSubfoldersAndFiles'
            NoPropagateInherit = $false
        }
    )
    DependsOn = '[xRobocopy]website','[xWebAppPool]AppPool'
}

I have made sure the dependson is set to make sure not to run the acl until the drive is online, folders copied, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions