Powershell wrapper for citool.exe #281
iainfm
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
|
I've also added a script to pull down the latest MS Learn document and extract the recommended block rules XML from it. Hopefully this will be provided as a downloadable link soon, but until then there's this. https://github.com/iainfm/CItool-PSWrapper/blob/main/Get-MSBlockList.ps1 |
Beta Was this translation helpful? Give feedback.
2 replies
-
You just need to use (CiTool -lp -json | ConvertFrom-Json).Policies |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I thought I'd share this here in case it's of any use to anyone.
I've written a little Powershell module (my first ever!) that puts verb-noun cmdlets around the citool.exe commands. I created it mainly because I don't like how citool.exe requires a key to be pressed after running, and so I could output (and process) only the information I want to see.
For example:
(Get-CIPolicies |? {$_.IsEnforced -eq $True}).FriendlyNameor
(Get-CIPolicies |? {$_.IsEnforced -eq $False}) | Select PolicyID, BasePolicyID, VersionAll of the citool.exe options are supported, but I have not yet tested the token addition/removal ones.
Use at your own risk etc etc.
The psm1 file is available in my GitHub repository
Beta Was this translation helpful? Give feedback.
All reactions