-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #38 - Missing $Resource definition in Set-NinjaOneOrganisationPol…
…icies. Fixes for some other small bugs/issues also included.
- Loading branch information
1 parent
9b2fe92
commit 0d0ed08
Showing
9 changed files
with
665 additions
and
618 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
indent_style = tab | ||
indent_size = 1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,148 @@ | ||
<# | ||
.SYNOPSIS | ||
Based on the PowerShell Script Analyzer (PSSA) presets. | ||
.LINK | ||
https://github.com/PowerShell/PSScriptAnalyzer/blob/master/Engine/Settings/ | ||
.SYNOPSIS | ||
Based on the PowerShell Script Analyzer (PSSA) presets. | ||
.LINK | ||
https://github.com/PowerShell/PSScriptAnalyzer/blob/master/Engine/Settings/ | ||
#> | ||
@{ | ||
Severity = @( | ||
'Error', | ||
'Warning', | ||
'Information' | ||
) | ||
IncludeRules = @( | ||
'PSAlignAssignmentStatement', | ||
'PSAvoidAssignmentToAutomaticVariable', | ||
'PSAvoidDefaultValueForMandatoryParameter', | ||
'PSAvoidDefaultValueSwitchParameter', | ||
'PSAvoidGlobalAliases', | ||
'PSAvoidGlobalVars', | ||
'PSAvoidUsingCmdletAliases', | ||
'PSAvoidUsingComputerNameHardcoded', | ||
'PSAvoidUsingConvertToSecureStringWithPlainText', | ||
'PSAvoidUsingDoubleQuotesForConstantString', | ||
'PSAvoidUsingEmptyCatchBlock', | ||
'PSAvoidUsingInvokeExpression', | ||
'PSAvoidUsingPlainTextForPassword', | ||
'PSAvoidUsingPositionalParameters', | ||
'PSAvoidUsingUserNameAndPasswordParams', | ||
'PSAvoidUsingWMICmdlet', | ||
'PSAvoidUsingWriteHost', | ||
'PSAvoidUsingWMICmdlet', | ||
'PSDSC*', | ||
'PSMissingModuleManifestField', | ||
'PSPlaceCloseBrace', | ||
'PSPlaceOpenBrace', | ||
'PSProvideCommentHelp', | ||
'PSReservedCmdletChar', | ||
'PSReservedParams', | ||
'PSShouldProcess', | ||
'PSUseApprovedVerbs', | ||
'PSUseCmdletCorrectly', | ||
'PSUseConsistentIndentation', | ||
'PSUseConsistentWhitespace', | ||
'PSUseCorrectCasing', | ||
'PSUseDeclaredVarsMoreThanAssignments', | ||
'PSUsePSCredentialType', | ||
'PSUseShouldProcessForStateChangingFunctions', | ||
#'PSUseSingularNouns', | ||
'PSUseLowerCaseForBooleanVariables', | ||
'PSUseLowerCaseForBuiltInFunctions', | ||
'PSUseLowerCaseForParameters', | ||
'PSUseTitleCaseForNonConstants', | ||
'PSUseTitleCaseFunctionNames', | ||
'PSUseTitleCaseVerbs', | ||
'PSUseTitleCaseForCmdletParameters', | ||
'PSUseTitleCaseForConstants' | ||
) | ||
Rules = @{ | ||
PSPlaceOpenBrace = @{ | ||
Enable = $true | ||
OnSameLine = $true | ||
NewLineAfter = $true | ||
IgnoreOneLineBlock = $true | ||
} | ||
|
||
PSPlaceCloseBrace = @{ | ||
Enable = $true | ||
NewLineAfter = $false | ||
IgnoreOneLineBlock = $true | ||
NoEmptyLineBefore = $false | ||
} | ||
|
||
PSUseConsistentIndentation = @{ | ||
Enable = $true | ||
Kind = 'space' | ||
PipelineIndentation = 'IncreaseIndentationForFirstPipeline' | ||
IndentationSize = 4 | ||
} | ||
|
||
PSUseConsistentWhitespace = @{ | ||
Enable = $true | ||
CheckInnerBrace = $true | ||
CheckOpenBrace = $true | ||
CheckOpenParen = $true | ||
CheckOperator = $true | ||
CheckPipe = $true | ||
CheckPipeForRedundantWhitespace = $false | ||
CheckSeparator = $true | ||
CheckParameter = $false | ||
IgnoreAssignmentOperatorInsideHashTable = $true | ||
} | ||
|
||
PSUseCorrectCasing = @{ | ||
Enable = $true | ||
} | ||
|
||
PSAvoidUsingDoubleQuotesForConstantString = @{ | ||
Enable = $true | ||
} | ||
|
||
PSAlignAssignmentStatement = @{ | ||
Enable = $false | ||
} | ||
} | ||
Severity = @( | ||
'Error', | ||
'Warning', | ||
'Information' | ||
) | ||
IncludeRules = @( | ||
'PSAlignAssignmentStatement', | ||
'PSAvoidAssignmentToAutomaticVariable', | ||
'PSAvoidDefaultValueForMandatoryParameter', | ||
'PSAvoidDefaultValueSwitchParameter', | ||
'PSAvoidGlobalAliases', | ||
'PSAvoidGlobalFunctions', | ||
'PSAvoidGlobalVars', | ||
'PSAvoidInvokingEmptyMembers', | ||
'PSAvoidNullOrEmptyHelpMessageAttribute', | ||
'PSAvoidSemicolonsAsLineTerminators', | ||
'PSAvoidShouldContinueWithoutForce', | ||
'PSAvoidTrailingWhitespace', | ||
'PSAvoidUsingBrokenHashAlgorithms', | ||
'PSAvoidUsingCmdletAliases', | ||
'PSAvoidUsingComputerNameHardcoded', | ||
'PSAvoidUsingConvertToSecureStringWithPlainText', | ||
'PSAvoidUsingDeprecatedManifestFields', | ||
'PSAvoidUsingDoubleQuotesForConstantString', | ||
'PSAvoidUsingEmptyCatchBlock', | ||
'PSAvoidUsingInvokeExpression', | ||
'PSAvoidUsingPlainTextForPassword', | ||
'PSAvoidUsingPositionalParameters', | ||
'PSAvoidUsingUserNameAndPasswordParams', | ||
'PSAvoidUsingWMICmdlet', | ||
'PSAvoidUsingWriteHost', | ||
'PSDSC*', | ||
'PSMisleadingBacktick', | ||
'PSMissingModuleManifestField', | ||
'PSPlaceCloseBrace', | ||
'PSPlaceOpenBrace', | ||
'PSPossibleIncorrectComparisonWithNull', | ||
'PSPossibleIncorrectUsageOfAssignmentOperator', | ||
'PSPossibleIncorrectUsageOfRedirectionOperator' | ||
'PSProvideCommentHelp', | ||
'PSReservedCmdletChar', | ||
'PSReservedParams', | ||
'PSReviewUnusedParameter', | ||
'PSShouldProcess', | ||
'PSUseApprovedVerbs', | ||
'PSUseBOMForUnicodeEncodedFile', | ||
'PSUseCmdletCorrectly', | ||
'PSUseCompatibleCmdlets', | ||
'PSUseCompatibleCommands', | ||
'PSUseCompatibleSyntax', | ||
'PSUseCompatibleTypes', | ||
'PSUseConsistentIndentation', | ||
'PSUseConsistentWhitespace', | ||
'PSUseCorrectCasing', | ||
'PSUseDeclaredVarsMoreThanAssignments', | ||
'PSUseLiteralInitializerForHashtable', | ||
'PSUseOutputTypeCorrectly', | ||
'PSUseProcessBlockForPipelineCommand', | ||
'PSUsePSCredentialType', | ||
'PSUseShouldProcessForStateChangingFunctions', | ||
'PSUseLowerCaseForBooleanVariables', | ||
'PSUseLowerCaseForBuiltInFunctions', | ||
'PSUseLowerCaseForParameters', | ||
'PSUseSingularNouns', | ||
'PSUseTitleCaseForCmdletParameters', | ||
'PSUseTitleCaseForConstants', | ||
'PSUseTitleCaseForNonConstants', | ||
'PSUseTitleCaseFunctionNames', | ||
'PSUseTitleCaseVerbs' | ||
) | ||
Rules = @{ | ||
PSAlignAssignmentStatement = @{ | ||
Enable = $false | ||
} | ||
PSPlaceCloseBrace = @{ | ||
Enable = $true | ||
NewLineAfter = $false | ||
IgnoreOneLineBlock = $true | ||
NoEmptyLineBefore = $false | ||
} | ||
PSPlaceOpenBrace = @{ | ||
Enable = $true | ||
OnSameLine = $true | ||
NewLineAfter = $true | ||
IgnoreOneLineBlock = $true | ||
} | ||
PSReviewUnusedParameter = @{ | ||
Enable = $true | ||
CommandsToTraverse = @( | ||
'New-NinjaOneQuery' | ||
) | ||
} | ||
PSUseCompatibleCmdlets = @{ | ||
Enable = $true | ||
Compatibility = @( | ||
'desktop-5.1.14393.206-windows', | ||
'core-6.1.0-windows', | ||
'core-6.1.0-linux', | ||
'core-6.1.0-linux-arm' | ||
'core-6.1.0-macos' | ||
) | ||
} | ||
PSUseCompatibleCommands = @{ | ||
Enable = $false | ||
} | ||
PSUseCompatibleSyntax = @{ | ||
Enable = $true | ||
TargetVersions = @( | ||
'5.1', | ||
'6.0', | ||
'7.0' | ||
) | ||
} | ||
PSUseConsistentIndentation = @{ | ||
Enable = $true | ||
Kind = 'tab' | ||
PipelineIndentation = 'IncreaseIndentationForFirstPipeline' | ||
} | ||
PSUseConsistentWhitespace = @{ | ||
Enable = $true | ||
CheckInnerBrace = $true | ||
CheckOpenBrace = $true | ||
CheckOpenParen = $true | ||
CheckOperator = $true | ||
CheckPipe = $true | ||
CheckPipeForRedundantWhitespace = $true | ||
CheckSeparator = $true | ||
CheckParameter = $true | ||
IgnoreAssignmentOperatorInsideHashTable = $true | ||
} | ||
PSUseCorrectCasing = @{ | ||
Enable = $true | ||
} | ||
PSUseSingularNouns = @{ | ||
Enable = $false | ||
} | ||
PSAvoidUsingDoubleQuotesForConstantString = @{ | ||
Enable = $true | ||
} | ||
} | ||
} |
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
Oops, something went wrong.