Skip to content
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

Version Five #401

Merged
merged 29 commits into from Dec 25, 2022
Merged

Version Five #401

merged 29 commits into from Dec 25, 2022

Conversation

AdhocAdam
Copy link
Owner

@AdhocAdam AdhocAdam commented Sep 4, 2022

Features

  • Introduces support for multiple keywords per keyword configuration

image

Changes/Enhancements

  • Follows PowerShell best practices per PSScriptAnalyzer

    Old Name Updated Name
    Get-TierMembers Get-TierMember
    Get-CiresonPortalAnnouncements Get-CiresonPortalAnnouncement
    Search-AvailableCiresonPortalOfferings Search-AvailableCiresonPortalOffering
    Get-AzureEmailKeywords Get-AzureEmailKeyword
    Get-SCSMWorkItemSettings Get-SCSMWorkItemSetting
    • Unused variables have been commented out. They are:
    #$userClass = get-scsmclass -name "System.User$"
    #$sysUserHasPrefRelClass = Get-SCSMRelationshipClass -name "System.UserHasPreference$"
  • A few functions have been refactored:
    • Get-TierMembership (used when verifying who is allowed to use [take])
    • Set-SCSMTemplate and Update-SCSMPropertyCollection now properly pass the Management Pack Alias between them
    • Get-SCOMDistributedAppHealth
      • Use of Where-Object when searching for a SCOM Distributed Application has been pushed further down the pipeline
      • Use of Where-Object has been removed when retrieving Active Alerts for a SCOM Distributed Application in a Critical Status
  • The selected AD Group to retrieve SCOM Distributed Application Health and/or an AD Group to make SCSM Announcements no longer uses a Label to show its Display Name.
  • The Templates pane in Settings uses the SCSM Template icon instead of the previous Exchange/PowerShell icon
  • The Logging pane in Settings uses the Windows Event Log icon
  • In some environments SMLets isn't imported correctly when the PowerShell starts so that section has been moved further up in the connector's execution.
  • Logging is more representative of start, process, and finish stages of the connector
  • More logging is provided around retrieving OAuth tokens when using 365
  • The DisplayName property for Incidents, Service Requests, Problems, and Change Requests are now set as though the Work Item was created in the SCSM console so as to respect the console's search

Bugs

  • Update-WorkItem does not correctly add attachments in that - individual attachments aren't added, but the email that contains all of the attachments is added
  • Fixes an issue wherein if an email address contains a PowerShell comparison operation e.g. -Le, -Ge, -And, etc then Get-SCSMUserByEmailAddress fails to correctly identify the related user
  • If connecting to Exchange Online and supplying credentials to the connector by ANY OTHER means that using the SCSM Workflow engine, the email address regex test will fail validation

To do:

  • Testing
  • Review
  • Update inline PowerShell notes
    • add new contributor
    • version and change notes
  • Update readme

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Closing curly bracket must not be preceded by a blank line

* codefactor, multiple line breaks and semicolon
* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Documentation header line must not be followed by a blank line. Opening/Closing curly bracket must not be followed/preceded by a blank line

* codefactor, blank lines

Closing curly bracket must not be preceded by a blank line

* codefactor, multiple line breaks and semicolon
* codefactor, blank lines

Closing curly bracket must not be preceded by a blank line.

* codefactor, multiple blank lines

The code must not contain multiple blank lines in a row
An opening curly bracket must not be followed by a blank line
* PSScriptAnalyzer, use singular nouns

To comply with best practices, functions should use singular nouns

* action trigger, remove linebreak

removing a line break so as to trigger github actions within a pull request
* icon, multiple keywords

adding icon for multiple keywords feature

* feature, multiple keywords

readme update for multiple keywords feature

* XAML, comma seperated keywords

modifies the regular expression on the text boxes for keywords so they can accept a single word or a series of words separated by a comma

* XAML, verbiage and UI resize

updating the XAML so the text boxes stretch as the Settings UI is resized. Also small verbiage changes in the header.

* feature, multiple keyword pwsh support

This change modifies the initial retrieval of keywords from the management pack so as handle a one or many keyword scenario PER keyword. The result of this is the current keyword variables are made regular expression friendly featuring a self-contained logical OR operation. e.g. \[(yes|approved|affirmative|roger)\] or in the case of a single word \[(yes)\]. In doing so, all subsequent actions taken against work items are preserved/reverse compatible while offering expanded functionality.

* XAML, from keyword

The "from" keyword is the only keyword whose exact substring position matters as it is used to identify the end of an email via the IndexOf() method. As such, it should not support multiple keyword instances.
@AdhocAdam AdhocAdam added this to the 5.0 milestone Sep 4, 2022
@AdhocAdam AdhocAdam self-assigned this Sep 4, 2022
@github-actions
Copy link

github-actions bot commented Sep 4, 2022

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [20] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3211
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 772
Message    : The variable 'userClass' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 788
Message    : The variable 'sysUserHasPrefRelClass' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4902
Message    : The variable 'isVerifiedSig' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2562
Message    : The variable 'isMember' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4211
Message    : The variable 'alias' is assigned but never used.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2634
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2713
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3112
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3146
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3596
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3661
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4171
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4287
Message    : The variable '$appName' is not declared within this ScriptBlock, an
             d is missing the 'Using:' scope modifier.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4311
Message    : The variable '$unhealthySCOMApp' is not declared within this Script
             Block, and is missing the 'Using:' scope modifier.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3057
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

@AdhocAdam AdhocAdam added the upgrade Planned vNext of the connector label Sep 4, 2022
The $userClass and $sysUserHasPrefRelClass variables are declared, but never used anywhere within the connector. Rather than delete them entirely, they have been commented out.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [18] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3211
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4902
Message    : The variable 'isVerifiedSig' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2562
Message    : The variable 'isMember' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4211
Message    : The variable 'alias' is assigned but never used.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2634
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2713
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3112
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3146
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3596
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3661
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4171
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4287
Message    : The variable '$appName' is not declared within this ScriptBlock, an
             d is missing the 'Using:' scope modifier.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4311
Message    : The variable '$unhealthySCOMApp' is not declared within this Script
             Block, and is missing the 'Using:' scope modifier.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3057
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

Upon some investigation of the function, it looks like PSScriptAnalyzer has an issue with the scope of $isMember. In order to fix this, an opportunity was presented that removes the initial $false declaration of $isMember, removes the foreach loop that checks each user of the group with the user coming into the function, and instead replaces it with a pipeline/where-object style operation. This also resulted in moving the logic for verifying if the group member is of type User.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [17] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4901
Message    : The variable 'isVerifiedSig' is assigned but never used.

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4210
Message    : The variable 'alias' is assigned but never used.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4203
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4222
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4286
Message    : The variable '$appName' is not declared within this ScriptBlock, an
             d is missing the 'Using:' scope modifier.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4310
Message    : The variable '$unhealthySCOMApp' is not declared within this Script
             Block, and is missing the 'Using:' scope modifier.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

While $alias is declared within Set-SCSMTemplate, it's only ever used in Update-SCSMPropertyCollection. As a result, alias has been introduced as a parameter to Update-SCSMPropertyCollection so as to properly receive the declared alias from Set-SCSMTemplate and resolve the error PSScriptAnalyzer is citing wherein $alias is declared but never used.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [16] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseDeclaredVarsMoreThanAssignments
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4902
Message    : The variable 'isVerifiedSig' is assigned but never used.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4287
Message    : The variable '$appName' is not declared within this ScriptBlock, an
             d is missing the 'Using:' scope modifier.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4311
Message    : The variable '$unhealthySCOMApp' is not declared within this Script
             Block, and is missing the 'Using:' scope modifier.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* usage, isVerifiedSig

isVerifiedSig is indirectly used because the operation to the right hand side of the = operator is actually performing the decryption and updating $decryptedBody. The result of isVerifiedSig is actually an array of digital signatures.

* logic and whitespace

removing whitespace caught by PSScriptAnalyzer on PR and adding logic to respect logging levels
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [15] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4287
Message    : The variable '$appName' is not declared within this ScriptBlock, an
             d is missing the 'Using:' scope modifier.

RuleName   : PSUseUsingScopeModifierInNewRunspaces
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4311
Message    : The variable '$unhealthySCOMApp' is not declared within this Script
             Block, and is missing the 'Using:' scope modifier.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* appname, using:

Addressing issue per PSScriptAnalyzer wherein a variable passed into Invoke-Command's scriptblock should make use of the using: scope modifier

* unhealthySCOMApp, using:

Addressing issue per PSScriptAnalyzer wherein a variable passed into Invoke-Command's scriptblock should make use of the using: scope modifier

* using: context

PSScriptAnalyzer is still throwing an issue about the using: context for the unhealthy app. Breaking out the name into its own variable.

* extra )

removing the closing ) from the previous commit
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

since standardizing the message format via PSCustomObjects, this function should be using $message.From instead of $message.From.Address
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

$parentworkitem does not exist in the default workitemtype switch
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

@AdhocAdam
Copy link
Owner Author

Previous commit was pushing #411 from primary to dev branch

@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

Description is missing the word "signed"
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* get instance vs. textbox update

instead of retrieving the GUID of the chosen SCOM group from the Settings MP and then updating a text/label with the chosen name. The ConsoleContextHelper correctly updates and manages the Single Instance Picker control on the SCOMIntegrationForm.xaml

* remove label, format single instance picker

AdminSettingsWizardData now manages the SingleInstancePicker control. The label is no longer required.

* instance picker update

updating SCSM Announcement Group per previous commit on use of single instance picker and the SCOM Group picker

* remove DisplayName label

SingleInstancePicker now correctly updates per AdminSettingsWizardData

* single instance picker

updating announcement group logic for single instance picker
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* contributor list

updating the list of contributors per pull requests #403 and #410

* contributor list

updating the list of contributors seen in the Settings UI per pull requests #403 and #410
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* logging icon and line breaks

Adding line breaks for the logging options and the Event Log icon

* template icon

instead of the smlets exchange connector icon it should be the SCSM Template icon

* icons, event log and template

adding icons for updated Logging and Template forms

* build icons

include the icons in the build so they are included into the Settings UI dll so they can be referenced in the XAML forms
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

it seems in certain configurations, SMLets isn't loaded soon enough in the connector's overall execution. As a result this prevents the script from successfully running.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3210
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 192
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 883
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1464
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2633
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2712
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3111
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3145
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3595
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3660
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4170
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4204
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3056
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

Previously if there were no messages to processes, the event order would be (at a minimum) 0 = connected to exchange and then 5 = filtering mailbox. There was no indication that there were 0/no messages to process and/or that 5 was the "last" event one would see for a run of the connector. As such, the logging could be misinterpreted as the connector not successfully completing a run. This change removes that uncertainty as the event is now logged regardless of the number of messages to process as well as introducing event 6 which shows the total runtime of the connector for a given number of messages. Now the minimum logging order is 0, 5, 2, 6 which is more representative of a start, connect, process and finish of the connector.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3211
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 193
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 884
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1465
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2634
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2713
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3112
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3146
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3596
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3661
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4171
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4205
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4224
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3057
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* Update smletsExchangeConnector.ps1

If mail address contains a dash, the address won't be found in SCSM

* Wrong parameter data when calling Add-FileToSCSMObject

parentworkitem is never set for the default switch

* Revert "Wrong parameter data when calling Add-FileToSCSMObject"

This reverts commit 48c1252.

* Added logging for OAuth

* event numbering

updating event log numbering

Co-authored-by: Adam <adhocadam@protonmail.com>
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3211
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 193
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 884
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1465
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2634
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2713
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3112
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3146
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3596
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3661
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4171
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4205
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4224
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3057
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

* Update smletsExchangeConnector.ps1

If mail address contains a dash, the address won't be found in SCSM

* Wrong parameter data when calling Add-FileToSCSMObject

parentworkitem is never set for the default switch

* Revert "Wrong parameter data when calling Add-FileToSCSMObject"

This reverts commit 48c1252.

* Added logging for OAuth

* Add displayname to new workitems as in the console

* different separator character

When an Incident is created, it uses a - instead of a : to build the DisplayName property

* character spacing

closer inspection of creating Work Items in the console show there is a difference in spacing for the DisplayName on Problem and Change Requests

Co-authored-by: Adam <adhocadam@protonmail.com>
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3211
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 193
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 884
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1465
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2634
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2713
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3112
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3146
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3596
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3661
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4171
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4205
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4224
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3057
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

updating notes on the inline powershell
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3228
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 210
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 901
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1482
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2651
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2730
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3129
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3163
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3613
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3678
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4188
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4222
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4241
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3074
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

correcting per #420
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3228
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 210
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 901
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1482
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2651
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2730
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3129
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3163
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3613
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3678
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4188
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4222
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4241
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3074
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

prepping inline notes for final release
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3229
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 211
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 902
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1483
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2652
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2731
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3130
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3164
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3614
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3679
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4189
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4242
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3075
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

rather than place the startTime variable at the first line, its now moved right before PowerShell actually starts executing/is loaded into memory. This preserves the initial comment block.
@github-actions
Copy link

PSScriptAnalyzer results:

🛑 [0] Errors, ⚠️ [13] Warnings, ℹ️ [1] Information


RuleName   : PSReviewUnusedParameter
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3229
Message    : The parameter 'MessageClass' has been declared but not used. 

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 211
Message    : Function 'New-SMEXCOEvent' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 902
Message    : Function 'New-WorkItem' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 1483
Message    : Function 'Update-WorkItem' has verb that could change system state.
              Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2652
Message    : Function 'Set-AssignedToPerSupportGroup' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 2731
Message    : Function 'New-CMDBUser' has verb that could change system state. Th
             erefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3130
Message    : Function 'Remove-CiresonWatchListUser' has verb that could change s
             ystem state. Therefore, the function has to support 'ShouldProcess'
             .

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3164
Message    : Function 'Set-WorkItemScheduledTime' has verb that could change sys
             tem state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3614
Message    : Function 'Set-CoreSCSMAnnouncement' has verb that could change syst
             em state. Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 3679
Message    : Function 'Set-CiresonPortalAnnouncement' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4189
Message    : Function 'Update-SCSMPropertyCollection' has verb that could change
              system state. Therefore, the function has to support 'ShouldProces
             s'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4223
Message    : Function 'Set-SCSMTemplate' has verb that could change system state
             . Therefore, the function has to support 'ShouldProcess'.

RuleName   : PSUseShouldProcessForStateChangingFunctions
Severity   : Warning
ScriptName : smletsExchangeConnector.ps1
Line       : 4242
Message    : Function 'Remove-PII' has verb that could change system state. Ther
             efore, the function has to support 'ShouldProcess'.

RuleName   : PSUseOutputTypeCorrectly
Severity   : Information
ScriptName : smletsExchangeConnector.ps1
Line       : 3075
Message    : The cmdlet 'Get-CiresonSuggestionURL' returns an object of type 'Sy
             stem.Object[]' but this type is not declared in the OutputType attr
             ibute.

@AdhocAdam AdhocAdam marked this pull request as ready for review December 23, 2022 17:52
@AdhocAdam AdhocAdam merged commit 29efc4c into primary Dec 25, 2022
@AdhocAdam AdhocAdam deleted the dev branch December 29, 2022 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upgrade Planned vNext of the connector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants