forked from m-dwyer/CryptoBlocker
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filegroups removed before adding new ones , even after bad connection #1
Open
hansstobbe
wants to merge
35
commits into
Kittzus:master
Choose a base branch
from
nexxai:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Update DeployCryptoBlocker.ps1 One major change and some minor tweaks pull request. - New-CBArraySplit does string splitting and joining to test the 4Kb limit, but file extensions can have commas in them so it risks splitting in the middle of a file extension and breaking. Reworked it to build up a temporary array on the fly, checking the extra string length each time won't push the array over the 4Kb limit. Updated it to output to the pipeline. Merged the FileGroupName property into it. - Normalise ConvertFrom-Json20 to use Param() block. Added comment. - Updated the Get-WmiObject call for drives with shares, formatting, added comments, does the share root with a DirectoryInfoCast which won't error if the item doesn't exist, and calls te Name property instead of string interpolation, forced it to be an array with @() and removed the following $null test. - Windows version comment, tweaked "other version" message. - ConvertFrom-Json20 call was using parens, which isn't PowerShell function call syntax. Changed, and expanded ForEach-Object alias in that line. - Reworked SkipList to do the trim() call when loading and use array -notcontains to remove the exclusions. - Changed the emtpy file message to use a here-string instead of backtick continuations. - Updated the call to New-CBArraySplit - Expanded % alias at end of file. * Fix two typos Selec-Object corrected to Select-Object in Get-WmiObject lines. SplitPath corrected to Split-Path in SkipList.txt code.
* Extended functionality and polished ouput - added the notification options to the template - removed notification options from the file screen - added active/passiv screen type configuration - added german translation to the notification messages - output polished a bit ;-) - added a few more comments * changed default language to english * changed default type to active
Dropping it down by a byte didn't help; due to some bad counting, this should fix it.
* initial commit of proof of concept scripts * Initial draft of README.md for PoC
Quick change as reported privately ---- Quote: Today I ran into a problem when executing your script on Windows Server 2016, it fails with error "servermanagercmd is not recognized as internal or external command..." The problem is that it incorrectly identifies Server 2016 as Server 2008. The Major version number of Server 2016 is 10, which returns true for the first clause. The script then goes into checking the minor version, and since the minor version number is 0, it returns false for all clauses, until it runs into the Server 2008 elseif and tries to run the unsopported command.
…tect those shares. If not, then protect all the shares on the system. (#43)
* Add support for a "ProtectList.txt" ... if this file exists, only protect those shares. If not, then protect all the shares on the system. * Fix a typo in the script. Also, add some text to README to describe the ProtectList.txt file.
* Add support for a "ProtectList.txt" ... if this file exists, only protect those shares. If not, then protect all the shares on the system. * Fix a typo in the script. Also, add some text to README to describe the ProtectList.txt file. * Add support for a file named "IncludeList.txt" that adds file screens to the list sent to FSRM. * Add ProtectList.txt and IncludeList.txt to .getignore
* Extended functionality and polished ouput - added the notification options to the template - removed notification options from the file screen - added active/passiv screen type configuration - added german translation to the notification messages - output polished a bit ;-) - added a few more comments * changed default language to english * changed default type to active * Changed SkipList from relative Path to automatic detected Path of the Script * Changed relative path to $PSScriptRoot Variable * Always use correct path for included files * Ignore working directory * works with task scheduler (does not write to Windows System root!) * Included files are always in the directory of the script * existing files in relative path will be moved to the script path if they exist * fixed bug in skiplist moveing
Create FSRM Exclusions for Specific Folders/Paths Listed in ExcludePaths.txt
* Extended functionality and polished ouput - added the notification options to the template - removed notification options from the file screen - added active/passiv screen type configuration - added german translation to the notification messages - output polished a bit ;-) - added a few more comments * changed default language to english * changed default type to active * Changed SkipList from relative Path to automatic detected Path of the Script * Changed relative path to $PSScriptRoot Variable * Always use correct path for included files * Ignore working directory * works with task scheduler (does not write to Windows System root!) * Included files are always in the directory of the script * existing files in relative path will be moved to the script path if they exist * fixed bug in skiplist moveing * Change relative path of ExcludePath.txt to $PSScriptRoot and added ExcludePath to .gitignore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is there a way , that the filegroups and templates are not removed before there is a good connection to https://fsrm.experiant.ca/api/v1/get , and that the configuration has been downloaded?
Now , if there is no good connection, the whole protection will be removed and there is NO protection.