Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Some capabilities of App Control for Business are only available on specific Windows versions. Learn more about App Control feature availability.
This section outlines the process to create an App Control for Business policy using a reference computer that is already configured with the software you want to allow. You can use this approach for fixed-workload devices that are dedicated to a specific functional purpose and share common configuration attributes with other devices servicing the same functional role. Examples of fixed-workload devices may include Active Directory Domain Controllers, Secure Admin Workstations, pharmaceutical drug-mixing equipment, manufacturing devices, cash registers, ATMs, etc. This approach can also be used to turn on App Control on systems "in the wild" and you want to minimize the potential impact on users' productivity.
Note
Some of the App Control for Business options described in this topic are only available on Windows 10 version 1903 and above, or Windows 11. When using this topic to plan your own organization's App Control policies, consider whether your managed clients can use all or some of these features and assess the impact for any features that may be unavailable on your clients. You may need to adapt this guidance to meet your specific organization's needs.
As described in common App Control for Business deployment scenarios, we'll use the example of Lamna Healthcare Company (Lamna) to illustrate this scenario. Lamna is attempting to adopt stronger application policies, including the use of App Control to prevent unwanted or unauthorized applications from running on their managed devices.
Alice Pena is the IT team lead tasked with the rollout of App Control.
Alice previously created a policy for the organization's fully managed end-user devices. She now wants to use App Control to protect Lamna's critical infrastructure servers. Lamna's imaging practice for infrastructure systems is to establish a "golden" image as a reference for what an ideal system should look like, and then use that image to clone more company assets. Alice decides to use these same "golden" image systems to create the App Control policies, which will result in separate custom base policies for each type of infrastructure server. As with imaging, she'll have to create policies from multiple golden computers based on model, department, application set, and so on.
Note
Make sure the reference computer is virus and malware-free, and install any software you want to be scanned before creating the App Control policy.
Each installed software application should be validated as trustworthy before you create a policy.
We recommend that you review the reference computer for software that can load arbitrary DLLs and run code or scripts that could render the PC more vulnerable. Examples include software aimed at development or scripting such as msbuild.exe (part of Visual Studio and the .NET Framework) which can be removed if you don't want to run scripts. You can remove or disable such software on the reference computer.
Alice identifies the following key factors to arrive at the "circle-of-trust" for Lamna's critical infrastructure servers:
Based on the above, Alice defines the pseudo-rules for the policy:
"Windows works" rules that authorize:
Rules for scanned files that authorize all pre-existing app binaries found on the device
To create the App Control policy, Alice runs each of the following commands in an elevated Windows PowerShell session, in order:
Initialize variables.
$PolicyPath=$env:userprofile+"\Desktop\"
$PolicyName="FixedWorkloadPolicy_Audit"
$LamnaServerPolicy=$PolicyPath+$PolicyName+".xml"
$DefaultWindowsPolicy=$env:windir+"\schemas\CodeIntegrity\ExamplePolicies\DefaultWindows_Audit.xml"
Use New-CIPolicy to create a new App Control policy by scanning the system for installed applications:
New-CIPolicy -FilePath $LamnaServerPolicy -Level SignedVersion -Fallback FilePublisher,FileName,Hash -ScanPath c:\ -UserPEs -MultiplePolicyFormat -OmitPaths c:\Windows,'C:\Program Files\WindowsApps\',c:\windows.old\,c:\users\ 3> CIPolicyLog.txt
Note
3> CIPolicylog.txt
, which redirects warning messages to a text file, CIPolicylog.txt.Merge the new policy with the WindowsDefault_Audit policy to ensure all Windows binaries and kernel drivers will load.
Merge-CIPolicy -OutputFilePath $LamnaServerPolicy -PolicyPaths $LamnaServerPolicy,$DefaultWindowsPolicy
Give the new policy a descriptive name, and initial version number:
Set-CIPolicyIdInfo -FilePath $LamnaServerPolicy -PolicyName $PolicyName
Set-CIPolicyVersion -FilePath $LamnaServerPolicy -Version "1.0.0.0"
Modify the merged policy to set policy rules:
Set-RuleOption -FilePath $LamnaServerPolicy -Option 3 # Audit Mode
Set-RuleOption -FilePath $LamnaServerPolicy -Option 6 # Unsigned Policy
Set-RuleOption -FilePath $LamnaServerPolicy -Option 9 # Advanced Boot Menu
Set-RuleOption -FilePath $LamnaServerPolicy -Option 12 # Enforce Store Apps
Set-RuleOption -FilePath $LamnaServerPolicy -Option 16 # No Reboot
Set-RuleOption -FilePath $LamnaServerPolicy -Option 17 # Allow Supplemental
Set-RuleOption -FilePath $LamnaServerPolicy -Option 19 # Dynamic Code Security
If appropriate, add more signer or file rules to further customize the policy for your organization.
Use ConvertFrom-CIPolicy to convert the App Control policy to a binary format:
[xml]$LamnaServerPolicyXML = Get-Content $LamnaServerPolicy
$PolicyId = $LamnaServerPolicyXML.SiPolicy.PolicyId
$LamnaServerPolicyBin = $PolicyPath+$PolicyId+".cip"
ConvertFrom-CIPolicy $LamnaServerPolicy $LamnaServerPolicyBin
Upload the base policy XML and the associated binary to a source control solution such as GitHub or a document management solution such as Office 365 SharePoint.
Alice now has an initial policy for Lamna's critical infrastructure servers that is ready to deploy in audit mode.
Alice previously created a policy for the organization's fully managed devices. Alice has included the fully managed device policy as part of Lamna's device build process so all new devices now begin with App Control enabled. She's preparing to deploy the policy to systems that are already in use, but is worried about causing disruption to users' productivity. To minimize that risk, Alice decides to take a different approach for those systems. She'll continue to deploy the fully managed device policy in audit mode to those devices, but for enforcement mode she'll merge the fully managed device policy rules with a policy created by scanning the device for all previously installed software. In this way, each device is treated as its own "golden" system.
Alice identifies the following key factors to arrive at the "circle-of-trust" for Lamna's fully managed in-use devices:
Based on the above, Alice defines the pseudo-rules for the policy:
For Lamna's existing, in-use devices, Alice deploys a script along with the Fully Managed Devices policy XML (not the converted App Control policy binary). The script then generates a custom policy locally on the client as described in the previous section, but instead of merging with the DefaultWindows policy, the script merges with Lamna's Fully Managed Devices policy. Alice also modifies the steps above to match the requirements of this different use case.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today