Skip to content

Commit 9251cf0

Browse files
committed
Revert change to System.Management.Automation.InvocationInfo.InvocationName.
1 parent e168567 commit 9251cf0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+46
-45
lines changed

Public/Get/Get-HaloAction.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function Get-HaloAction {
7676
[switch]$NonSystem
7777
)
7878
Invoke-HaloPreFlightCheck
79-
$CommandName = $MyInvocation.InvocationName
79+
$CommandName = $MyInvocation.MyCommand.Name
8080
$Parameters = (Get-Command -Name $CommandName).Parameters
8181
# Workaround to prevent the query string processor from adding an 'actionid=' parameter by removing it from the set parameters.
8282
if ($ActionID) {

Public/Get/Get-HaloAgent.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function Get-HaloAgent {
7070

7171
)
7272
Invoke-HaloPreFlightCheck
73-
$CommandName = $MyInvocation.InvocationName
73+
$CommandName = $MyInvocation.MyCommand.Name
7474
$Parameters = (Get-Command -Name $CommandName).Parameters
7575
# Workaround to prevent the query string processor from adding an 'agentid=' parameter by removing it from the set parameters.
7676
if ($AgentID) {

Public/Get/Get-HaloAppointment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Get-HaloAppointment {
6262
[switch]$IncludeDetails
6363
)
6464
Invoke-HaloPreFlightCheck
65-
$CommandName = $MyInvocation.InvocationName
65+
$CommandName = $MyInvocation.MyCommand.Name
6666
$Parameters = (Get-Command -Name $CommandName).Parameters
6767
# Workaround to prevent the query string processor from adding a 'appointmentid=' parameter by removing it from the set parameters.
6868
if ($AppointmentID) {

Public/Get/Get-HaloAsset.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function Get-HaloAsset {
239239
[int]$UserId
240240
)
241241
Invoke-HaloPreFlightCheck
242-
$CommandName = $MyInvocation.InvocationName
242+
$CommandName = $MyInvocation.MyCommand.Name
243243
$Parameters = (Get-Command -Name $CommandName).Parameters
244244
# Workaround to prevent the query string processor from adding a 'assetid=' parameter by removing it from the set parameters.
245245
if ($AssetID) {

Public/Get/Get-HaloAssetType.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function Get-HaloAssetType {
6060
[Switch]$ShowAll
6161
)
6262
Invoke-HaloPreFlightCheck
63-
$CommandName = $MyInvocation.InvocationName
63+
$CommandName = $MyInvocation.MyCommand.Name
6464
$Parameters = (Get-Command -Name $CommandName).Parameters
6565
# Workaround to prevent the query string processor from adding a 'assettypeid=' parameter by removing it from the set parameters.
6666
if ($AssetTypeID) {

Public/Get/Get-HaloAttachment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function Get-HaloAttachment {
4949
[Switch]$GetToken
5050
)
5151
Invoke-HaloPreFlightCheck
52-
$CommandName = $MyInvocation.InvocationName
52+
$CommandName = $MyInvocation.MyCommand.Name
5353
$Parameters = (Get-Command -Name $CommandName).Parameters
5454
# Workaround to prevent the query string processor from adding a 'attachmentid=' parameter by removing it from the set parameters.
5555
if ($AttachmentID) {

Public/Get/Get-HaloAzureADConnection.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Get-HaloAzureADConnection {
3030
[switch]$IncludeTenants
3131
)
3232
Invoke-HaloPreFlightCheck
33-
$CommandName = $MyInvocation.InvocationName
33+
$CommandName = $MyInvocation.MyCommand.Name
3434
$Parameters = (Get-Command -Name $CommandName).Parameters
3535
# Workaround to prevent the query string processor from adding a 'AzureConnectionID=' parameter by removing it from the set parameters.
3636
if ($AzureConnectionID) {

Public/Get/Get-HaloBillingTemplate.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function Get-HaloBillingTemplate {
2525

2626
)
2727
Invoke-HaloPreFlightCheck
28-
$CommandName = $MyInvocation.InvocationName
28+
$CommandName = $MyInvocation.MyCommand.Name
2929
$Parameters = (Get-Command -Name $CommandName).Parameters
3030
# Workaround to prevent the query string processor from adding a 'TemplateID=' parameter by removing it from the set parameters.
3131
if ($TemplateID) {

Public/Get/Get-HaloCRMNote.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function Get-HaloCRMNote {
3434
[switch]$IncludeAttachments
3535
)
3636
Invoke-HaloPreFlightCheck
37-
$CommandName = $MyInvocation.InvocationName
37+
$CommandName = $MyInvocation.MyCommand.Name
3838
$Parameters = (Get-Command -Name $CommandName).Parameters
3939
# Workaround to prevent the query string processor from adding an 'crmnoteid=' parameter by removing it from the set parameters.
4040
if ($CRMNoteID) {

Public/Get/Get-HaloCategory.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Get-HaloCategory {
2424
[switch]$ShowAll
2525
)
2626
Invoke-HaloPreFlightCheck
27-
$CommandName = $MyInvocation.InvocationName
27+
$CommandName = $MyInvocation.MyCommand.Name
2828
$Parameters = (Get-Command -Name $CommandName).Parameters
2929
# Workaround to prevent the query string processor from adding a 'CategoryID=' parameter by removing it from the set parameters.
3030
if ($CategoryID) {

0 commit comments

Comments
 (0)