Code Monkey home page Code Monkey logo

applicationcontrol's Introduction

Application Control

A module for retrieving application information for application control and allow listing purposes with tools such as Ivanti Application Manager and Microsoft AppLocker.

Module

This repository contains a folder named ApplicationControl. The folder needs to be installed into one of your PowerShell Module Paths. To see the full list of available PowerShell Module paths, use $env:PSModulePath.split(';') in a PowerShell console.

Common PowerShell module paths include:

  • Current User: %USERPROFILE%\Documents\WindowsPowerShell\Modules\
  • All Users: %ProgramFiles%\WindowsPowerShell\Modules\
  • OneDrive: $env:OneDrive\Documents\WindowsPowerShell\Modules\

Manual Installation

  1. Download the master branch to your workstation.
  2. Copy the contents of the ApplicationControl folder onto your workstation into the desired PowerShell Module path.
  3. Open a Powershell console with the Run as Administrator option.
  4. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass.

Once installation is complete, you can validate that the module exists by running Get-Module -ListAvailable ApplicationControl. To use the module when it is located in one of the locations above, load it with:

Import-Module ApplicationControl

The module can be loaded from a specific path if it is not in one of the default locations:

Import-Module C:\Temp\ApplicationControl

Examples

Ivanti Application Control

Here is an example using the module to create an Ivanti Application Control configuration for Microsoft Teams. This application uses the Electron framework and Squirell for in process updates, making allow listing a challenge because the application installs and updates in the user profile and in the user context. This example trawls the application folders and find unique metadata to turn into an Ivanti Application Control configuration using RegEx paths to simplify the configuration as much as possible.

Import-Module ApplicationControl -Force
$Path = "C:\Users\aaron\AppData\Local\Microsoft\Teams", "C:\Users\aaron\AppData\Local\Microsoft\TeamsMeetingAddin"
$Files = @()
foreach ($Folder in $Path) {
    $AppFiles = Get-AcFileMetadata -Verbose -Path $Folder
    $UniqueFiles = Select-AcUniqueMetadata -FileList $AppFiles -Verbose
    $RegExFiles = ConvertTo-RegExPath -Files $UniqueFiles -Path $Folder -Verbose
    $Files += $RegExFiles
    Remove-Variable AppFiles, NoMetadata, Metadata, UniqueFiles, RegExFiles
}
New-AcAampConfiguration -AccessibleFiles $Files -Path C:\Temp\MicrosoftTeams.aamp -Verbose

applicationcontrol's People

Contributors

aaronparker avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ericholmstrom

applicationcontrol's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.