# Forcibly Push Installer to AD Domain

<div class="wiki-content group" id="bkmrk-in-some-fragile-envi">In some fragile environments, particularly if recovering from a recent attack or outage, normal RMM and/or SCCM deployments might not be an option. Here you will find a script that can serve as a template for how you might be able to forcibly push a CC installation across an active directory environment.

**Note**: This script will likely need to be tailored for your use case, and does require domain credentials to run. It is expected that this script would be run directly on a (primary) domain controller.

## Steps to run

1. Update the `$install_targets` variable with a list of machine names (NETBIOS or similar host names)
2. Download a ‘normal’ installer ps1 script from [the Cyber Crucible dashboard](https://dashboard.cybercrucible.com)
3. Update variables in the push\_installer\_ad.ps1 script to be the same as your group specific variables from the dashboard script
    
    
    1. `${GroupId}`
    2. `${ClientAuth}`
    3. any `--rest-pub-key` variables
4. Download a native CLI executable from [the Cyber Crucible dashboard](https://dashboard.cybercrucible.com)
    
    
    1. Place the CLI on a network share, or somewhere accessible to all machines to be installed
        
        
        1. This prevents each machine from having to waste time and bandwidth re-downloading the same exe
        2. The same exe may be executed for different OSs, as the installer will pull down the relevant service/driver/installation files for the detected OS and role of the machine.
    2. Set `${OutputFilePath` to the path of the CLI on a network share
5. Possibly remove ICMP online check (if not needed / invalid for your environment)
6. Run script with `-credential`
    
    
    1. e.g. `./push_installer_ad.ps1 -credential ad1\kyle`

[](%5BATTACHMENT%3A%5D)

</div><div id="bkmrk--4"> </div>