-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels