Home Analyst Portal

How to set "3rd party" comments to a value rather than null.

Eric_EvansEric_Evans Member IT Monkey ✭

I have researched this issue and found that it's existence is very well documented. However, the solution seems to be somewhat elusive, or I am not looking in the right spot....

Basically when a comment comes in via Email the exchange sets the comment to a comment by and analist and the "IsPrivate" flag is set to null (typically it would be set to either a True [box would be check] or False [no check in the box]). However, in this case it is set to a null and it has a Square in the box.

I found this Code:

$InstallationConfigKey = 'HKLM:\SOFTWARE\Microsoft\System Center\2010\Service Manager\Setup'

$InstallPath = (Get-ItemProperty -Path $InstallationConfigKey -Name InstallDirectory).InstallDirectory

Import-Module -Name ($InstallPath + "Powershell\System.Center.Service.Manager.psd1") -Global

$criteria = "IsPrivate is null"

$class = Get-SCSMClass -Name System.WorkItem.TroubleTicket.AnalystCommentLog

$criteria = New-Object Microsoft.EnterpriseManagement.Common.EnterpriseManagementObjectCriteria($criteria, $class)

Get-SCSMClassInstance -Criteria $criteria | FT name #| % { $_.IsPrivate = $false; Update-SCSMClassInstance
 -Instance $_ }

and it yields this result:

New-Alias : The alias is not allowed, because an alias with the name 'Export-SCSMManagementPack' already exists.
At E:\Service Manager\Powershell\System.Center.Service.Manager.psm1:6 char:1
+ New-Alias -Scope Global Export-SCSMManagementPack Export-SCManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (Export-SCSMManagementPack:String) [New-Alias], SessionStateException
    + FullyQualifiedErrorId : AliasAlreadyExists,Microsoft.PowerShell.Commands.NewAliasCommand
 
New-Alias : The alias is not allowed, because an alias with the name 'Get-SCSMManagementPack' already exists.
At E:\Service Manager\Powershell\System.Center.Service.Manager.psm1:12 char:1
+ New-Alias -Scope Global Get-SCSMManagementPack Get-SCManagementPack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (Get-SCSMManagementPack:String) [New-Alias], SessionStateException
    + FullyQualifiedErrorId : AliasAlreadyExists,Microsoft.PowerShell.Commands.NewAliasCommand
 
New-Alias : The alias is not allowed, because an alias with the name 'Import-SCSMManagementPack' already exists.
At E:\Service Manager\Powershell\System.Center.Service.Manager.psm1:17 char:1
+ New-Alias -Scope Global Import-SCSMManagementPack Import-SCManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (Import-SCSMManagementPack:String) [New-Alias], SessionStateException
    + FullyQualifiedErrorId : AliasAlreadyExists,Microsoft.PowerShell.Commands.NewAliasCommand
 
New-Alias : The alias is not allowed, because an alias with the name 'New-SCSMManagementPack' already exists.
At E:\Service Manager\Powershell\System.Center.Service.Manager.psm1:22 char:1
+ New-Alias -Scope Global New-SCSMManagementPack New-SCManagementPack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (New-SCSMManagementPack:String) [New-Alias], SessionStateException
    + FullyQualifiedErrorId : AliasAlreadyExists,Microsoft.PowerShell.Commands.NewAliasCommand
 
New-Alias : The alias is not allowed, because an alias with the name 'Remove-SCSMManagementPack' already exists.
At E:\Service Manager\Powershell\System.Center.Service.Manager.psm1:31 char:1
+ New-Alias -Scope Global Remove-SCSMManagementPack Remove-SCManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (Remove-SCSMManagementPack:String) [New-Alias], SessionStateException
    + FullyQualifiedErrorId : AliasAlreadyExists,Microsoft.PowerShell.Commands.NewAliasCommand

My plan is that I can make a Notification Subscription that will fire when the Trouble Ticket Analyst comment is updated from Null to False.

Any help whatsoever would be apricated.

Best Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Answer ✓

    Did you ever find the setting for this in the SMlets Exchange connector?

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓

    A comment on your errors: It seems like you are importing the built-on cmdlets for SCSM, while already have imported SMLets. If you need to use both (but why would you?), you'll need to import the built-in cmdlets first, and then import SMLets with -force.


    If you are using the SMLets Exchange Connector, there's a setting for this exact thing:

    #Comments can continue to be left as $null (stock connector behavior), always Private ($true), or always Public ($false). Please be mindful that this setting
    #can impact any custom Action Log notifiers you've configured and potentially expose/hide information from one party (Assigned To/Affected User).
    #ExternalPartyCommentPrivacy*R = Control Comment Privacy when the User leaving the comment IS NOT the Affected User or Assigned To User
    
    

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Answer ✓

    Did you ever find the setting for this in the SMlets Exchange connector?

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓

    A comment on your errors: It seems like you are importing the built-on cmdlets for SCSM, while already have imported SMLets. If you need to use both (but why would you?), you'll need to import the built-in cmdlets first, and then import SMLets with -force.


    If you are using the SMLets Exchange Connector, there's a setting for this exact thing:

    #Comments can continue to be left as $null (stock connector behavior), always Private ($true), or always Public ($false). Please be mindful that this setting
    #can impact any custom Action Log notifiers you've configured and potentially expose/hide information from one party (Assigned To/Affected User).
    #ExternalPartyCommentPrivacy*R = Control Comment Privacy when the User leaving the comment IS NOT the Affected User or Assigned To User
    
    
  • Eric_EvansEric_Evans Member IT Monkey ✭

    Thank you for the replies. I did find the settings in the SMLets connector. Appreciate it Justin.

Sign In or Register to comment.