mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 09:52:30 +00:00
Fix missing password #9
This commit is contained in:
parent
c08f2732d0
commit
54b332f2c0
3 changed files with 11 additions and 1 deletions
8
PSScriptAnalyzerSettings.psd1
Normal file
8
PSScriptAnalyzerSettings.psd1
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
@{
|
||||||
|
Severity=@('Error','Warning')
|
||||||
|
# IncludeRules = @()
|
||||||
|
ExcludeRules = @(
|
||||||
|
'PSAvoidUsingUserNameAndPassWordParams',
|
||||||
|
'PSAvoidUsingPlainTextForPassword'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -70,6 +70,8 @@ function New-User() {
|
||||||
[parameter(mandatory = $true)]
|
[parameter(mandatory = $true)]
|
||||||
[string]$userName,
|
[string]$userName,
|
||||||
|
|
||||||
|
[string]$password,
|
||||||
|
|
||||||
[string]$jobTitle,
|
[string]$jobTitle,
|
||||||
|
|
||||||
[string]$email,
|
[string]$email,
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ Describe "SnipeitPS" {
|
||||||
}
|
}
|
||||||
|
|
||||||
Context 'PSScriptAnalyzer Rules' {
|
Context 'PSScriptAnalyzer Rules' {
|
||||||
$analysis = Invoke-ScriptAnalyzer -Path "$moduleRoot" -Recurse
|
$analysis = Invoke-ScriptAnalyzer -Path "$moduleRoot" -Recurse -Settings "$projectRoot\PSScriptAnalyzerSettings.psd1"
|
||||||
$scriptAnalyzerRules = Get-ScriptAnalyzerRule
|
$scriptAnalyzerRules = Get-ScriptAnalyzerRule
|
||||||
|
|
||||||
forEach ($rule in $scriptAnalyzerRules)
|
forEach ($rule in $scriptAnalyzerRules)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue