From 303822485ca562517d4b5acf9977e23dadc09f4f Mon Sep 17 00:00:00 2001 From: Florian Stosse Date: Fri, 30 Sep 2022 14:58:58 +0200 Subject: [PATCH] [WDAC] Ensure that destination folders are present If not, we create them. --- .../deployment/deploy-wdac-policies-with-script.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/security/threat-protection/windows-defender-application-control/deployment/deploy-wdac-policies-with-script.md b/windows/security/threat-protection/windows-defender-application-control/deployment/deploy-wdac-policies-with-script.md index 28a74c5e9f..9d25e238cf 100644 --- a/windows/security/threat-protection/windows-defender-application-control/deployment/deploy-wdac-policies-with-script.md +++ b/windows/security/threat-protection/windows-defender-application-control/deployment/deploy-wdac-policies-with-script.md @@ -88,8 +88,9 @@ In addition to the steps outlined above, the binary policy file must also be cop $MountPoint = 'C:\EFIMount' $EFIDestinationFolder = "$MountPoint\EFI\Microsoft\Boot\CiPolicies\Active" $EFIPartition = (Get-Partition | Where-Object IsSystem).AccessPaths[0] + if (-Not (Test-Path $MountPoint)) { New-Item -Path $MountPoint -Type Directory -Force } mountvol $MountPoint $EFIPartition - mkdir $EFIDestinationFolder + if (-Not (Test-Path $EFIDestinationFolder)) { New-Item -Path $EFIDestinationFolder -Type Directory -Force } ``` 2. Copy the signed policy to the created folder: