Skip to content

Manage the Windows integrity label policies on an object through PowerShell

License

Notifications You must be signed in to change notification settings

jborean93/PSIntegrity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSIntegrity

Build status PowerShell Gallery

Details on the mandatory integrity mechanism can be found at Windows Vista Integrity Mechanism Technical Reference

Info

Cmdlets included with this module are;

The Get-IntegrityLabel cmdlet outputs an instance of BaseObjectLabel which can be used as an input to Remove-IntegrityLabel or Set-IntegrityLabel. This object can also be used separately from the other cmdlets to manage the integrity level label of an object if that is preferred. The docs for this class can be found at Docs/BaseObjectLabel.

Requirements

These cmdlets have the following requirements

  • PowerShell v3.0 or newer
  • Windows PowerShell (not PowerShell Core)
  • Windows Server 2008 R2/Windows 7 or newer

Installing

The easiest way to install this module is through PowerShellGet. This is installed by default with PowerShell 5 but can be added on PowerShell 3 or 4 by installing the MSI here.

Once installed, you can install this module by running;

# Install for all users
Install-Module -Name PSIntegrity

# Install for only the current user
Install-Module -Name PSIntegrity -Scope CurrentUser

If you wish to remove the module, just run Uninstall-Module -Name PSIntegrity.

If you cannot use PowerShellGet, you can still install the module manually, here are some basic steps on how to do this;

  1. Download the latext zip from GitHub here
  2. Extract the zip
  3. Copy the folder PSIntegrity inside the zip to a path that is set in $env:PSModulePath. By default this could be C:\Program Files\WindowsPowerShell\Modules or C:\Users\<user>\Documents\WindowsPowerShell\Modules
  4. Reopen PowerShell and unblock the downloaded files with $path = (Get-Module -Name PSPrivilege -ListAvailable).ModuleBase; Unblock-File -Path $path\*.psd1;
  5. Reopen PowerShell one more time and you can start using the cmdlets

Note: You are not limited to installing the module to those example paths, you can add a new entry to the environment variable PSModulePath if you want to use another path.

Contributing

Contributing is quite easy, fork this repo and submit a pull request with the changes. To test out your changes locally you can just run .\build.ps1 in PowerShell. This script will ensure all dependencies are installed before running the test suite.

Note: this requires PowerShellGet or WMF 5 to be installed

Backlog

  • Add support for different types of objects like services, registry keys

About

Manage the Windows integrity label policies on an object through PowerShell

Resources

License

Stars

Watchers

Forks

Packages

No packages published