forked from OCram85/PSCredentialStore
fix lint (PSScriptAnalyzer) issues (#62)
#### 📖 Summary <!-- Provide a summary of your changes. Describe the why and not how. --> #### 📑 Test Plan > 💡 Select your test plan for the code changes. - [x] Tested via Drone.io pipeline - [ ] Custom test - [ ] No test plan ##### Details / Justification <!-- Add your test details or justification for missing tests here. --> #### 📚 Additional Notes <!-- A place for additional detail notes. --> Co-authored-by: OCram85 <marco.blessing@googlemail.com> Reviewed-on: OCram85/PSCredentialStore#62
This commit is contained in:
@ -40,6 +40,11 @@ function Remove-CredentialStoreItem {
|
||||
#>
|
||||
|
||||
[CmdletBinding(DefaultParameterSetName = 'Private')]
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
|
||||
'PSUseShouldProcessForStateChangingFunctions',
|
||||
'',
|
||||
Justification = 'Removes data from existing store.'
|
||||
)]
|
||||
param (
|
||||
[Parameter(Mandatory = $true, ParameterSetName = 'Private')]
|
||||
[Parameter(Mandatory = $true, ParameterSetName = 'Shared')]
|
||||
@ -90,7 +95,7 @@ function Remove-CredentialStoreItem {
|
||||
$CredentialName = $RemoteHost
|
||||
}
|
||||
|
||||
if (Get-Member -InputObject $CSContent -Name $CredentialName -Membertype NoteProperty) {
|
||||
if (Get-Member -InputObject $CSContent -Name $CredentialName -MemberType NoteProperty) {
|
||||
# We need to use the .NET Method because there is no easier way in PowerShell.
|
||||
$CSContent.PSObject.Properties.Remove($CredentialName)
|
||||
ConvertTo-Json -InputObject $CSContent -Depth 5 | Out-File -FilePath $Path -Encoding utf8
|
||||
|
Reference in New Issue
Block a user