File tree Expand file tree Collapse file tree 6 files changed +16
-0
lines changed
Expand file tree Collapse file tree 6 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -100,9 +100,11 @@ Function Add-ServiceNowAttachment {
100100 ' SpecifyConnectionFields' {
101101 $getServiceNowTableEntry.Add (' Credential' , $Credential )
102102 $getServiceNowTableEntry.Add (' ServiceNowURL' , $ServiceNowURL )
103+ break
103104 }
104105 ' UseConnectionObject' {
105106 $getServiceNowTableEntry.Add (' Connection' , $Connection )
107+ break
106108 }
107109 Default {
108110 If (-not (Test-ServiceNowAuthIsSet )) {
@@ -117,11 +119,13 @@ Function Add-ServiceNowAttachment {
117119 Switch ($PSCmdlet.ParameterSetName ) {
118120 ' SpecifyConnectionFields' {
119121 $ApiUrl = ' https://' + $ServiceNowURL + ' /api/now/v1/attachment'
122+ break
120123 }
121124 ' UseConnectionObject' {
122125 $SecurePassword = ConvertTo-SecureString $Connection.Password - AsPlainText - Force
123126 $Credential = New-Object System.Management.Automation.PSCredential ($Connection.Username , $SecurePassword )
124127 $ApiUrl = ' https://' + $Connection.ServiceNowUri + ' /api/now/v1/attachment'
128+ break
125129 }
126130 Default {
127131 If ((Test-ServiceNowAuthIsSet )) {
Original file line number Diff line number Diff line change @@ -106,11 +106,13 @@ Function Get-ServiceNowAttachment {
106106 Switch ($PSCmdlet.ParameterSetName ) {
107107 ' SpecifyConnectionFields' {
108108 $ApiUrl = ' https://' + $ServiceNowURL + ' /api/now/v1/attachment'
109+ break
109110 }
110111 ' UseConnectionObject' {
111112 $SecurePassword = ConvertTo-SecureString $Connection.Password - AsPlainText - Force
112113 $Credential = New-Object System.Management.Automation.PSCredential ($Connection.Username , $SecurePassword )
113114 $ApiUrl = ' https://' + $Connection.ServiceNowUri + ' /api/now/v1/attachment'
115+ break
114116 }
115117 Default {
116118 If ((Test-ServiceNowAuthIsSet )) {
Original file line number Diff line number Diff line change @@ -84,9 +84,11 @@ Function Get-ServiceNowAttachmentDetail {
8484 ' SpecifyConnectionFields' {
8585 $getServiceNowTableEntry.Add (' Credential' , $Credential )
8686 $getServiceNowTableEntry.Add (' ServiceNowURL' , $ServiceNowURL )
87+ break
8788 }
8889 ' UseConnectionObject' {
8990 $getServiceNowTableEntry.Add (' Connection' , $Connection )
91+ break
9092 }
9193 Default {
9294 If (-not (Test-ServiceNowAuthIsSet )) {
@@ -101,11 +103,13 @@ Function Get-ServiceNowAttachmentDetail {
101103 Switch ($PSCmdlet.ParameterSetName ) {
102104 ' SpecifyConnectionFields' {
103105 $ApiUrl = ' https://' + $ServiceNowURL + ' /api/now/v1/attachment'
106+ break
104107 }
105108 ' UseConnectionObject' {
106109 $SecurePassword = ConvertTo-SecureString $Connection.Password - AsPlainText - Force
107110 $Credential = New-Object System.Management.Automation.PSCredential ($Connection.Username , $SecurePassword )
108111 $ApiUrl = ' https://' + $Connection.ServiceNowUri + ' /api/now/v1/attachment'
112+ break
109113 }
110114 Default {
111115 If ((Test-ServiceNowAuthIsSet )) {
Original file line number Diff line number Diff line change @@ -96,9 +96,11 @@ function Get-ServiceNowTableEntry {
9696 ' SpecifyConnectionFields' {
9797 $getServiceNowTableSplat.Add (' Credential' , $Credential )
9898 $getServiceNowTableSplat.Add (' ServiceNowURL' , $ServiceNowURL )
99+ break
99100 }
100101 ' UseConnectionObject' {
101102 $getServiceNowTableSplat.Add (' Connection' , $Connection )
103+ break
102104 }
103105 Default {}
104106 }
Original file line number Diff line number Diff line change @@ -60,11 +60,13 @@ Function Remove-ServiceNowAttachment {
6060 Switch ($PSCmdlet.ParameterSetName ) {
6161 ' SpecifyConnectionFields' {
6262 $ApiUrl = ' https://' + $ServiceNowURL + ' /api/now/v1/attachment'
63+ break
6364 }
6465 ' UseConnectionObject' {
6566 $SecurePassword = ConvertTo-SecureString $Connection.Password - AsPlainText - Force
6667 $Credential = New-Object System.Management.Automation.PSCredential ($Connection.Username , $SecurePassword )
6768 $ApiUrl = ' https://' + $Connection.ServiceNowUri + ' /api/now/v1/attachment'
69+ break
6870 }
6971 Default {
7072 If (Test-ServiceNowAuthIsSet ) {
Original file line number Diff line number Diff line change @@ -73,12 +73,14 @@ Function Update-ServiceNowNumber {
7373 $getServiceNowTableEntry.Add (' ServiceNowCredential' , $Credential )
7474 $getServiceNowTableEntry.Add (' ServiceNowURL' , $ServiceNowURL )
7575 $ServiceNowURL = ' https://' + $ServiceNowURL + ' /api/now/v1'
76+ break
7677 }
7778 ' UseConnectionObject' {
7879 $getServiceNowTableEntry.Add (' Connection' , $Connection )
7980 $SecurePassword = ConvertTo-SecureString $Connection.Password - AsPlainText - Force
8081 $Credential = New-Object System.Management.Automation.PSCredential ($Connection.Username , $SecurePassword )
8182 $ServiceNowURL = ' https://' + $Connection.ServiceNowUri + ' /api/now/v1'
83+ break
8284 }
8385 Default {
8486 If ((Test-ServiceNowAuthIsSet )) {
You can’t perform that action at this time.
0 commit comments