Skip to content

Commit 874ec15

Browse files
Move SignalR to main (#22067)
1 parent 19b6be4 commit 874ec15

File tree

110 files changed

+411
-2030
lines changed

Some content is hidden

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

110 files changed

+411
-2030
lines changed

src/SignalR/SignalR.Autorest/Az.SignalR.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.SignalR.private.dll'
1313
FormatsToProcess = './Az.SignalR.format.ps1xml'
14-
FunctionsToExport = 'Get-AzWebPubSub', 'Get-AzWebPubSubHub', 'Get-AzWebPubSubKey', 'Get-AzWebPubSubSku', 'Get-AzWebPubSubUsage', 'New-AzWebPubSub', 'New-AzWebPubSubHub', 'New-AzWebPubSubKey', 'Remove-AzWebPubSub', 'Remove-AzWebPubSubHub', 'Restart-AzWebPubSub', 'Test-AzWebPubSubNameAvailability', 'Update-AzWebPubSub', '*'
14+
FunctionsToExport = 'Get-AzWebPubSub', 'Get-AzWebPubSubCustomCertificate', 'Get-AzWebPubSubCustomDomain', 'Get-AzWebPubSubHub', 'Get-AzWebPubSubKey', 'Get-AzWebPubSubSku', 'Get-AzWebPubSubUsage', 'New-AzWebPubSub', 'New-AzWebPubSubCustomCertificate', 'New-AzWebPubSubCustomDomain', 'New-AzWebPubSubEventHubEndpointObject', 'New-AzWebPubSubEventNameFilterObject', 'New-AzWebPubSubHub', 'New-AzWebPubSubKey', 'Remove-AzWebPubSub', 'Remove-AzWebPubSubCustomCertificate', 'Remove-AzWebPubSubCustomDomain', 'Remove-AzWebPubSubHub', 'Restart-AzWebPubSub', 'Test-AzWebPubSubNameAvailability', 'Update-AzWebPubSub', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/SignalR/SignalR.Autorest/build-module.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
123123

124124
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
125125
$modelCmdlets = @()
126+
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
127+
if (Test-Path $modelCmdletFolder) {
128+
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
129+
}
126130
if ($modelCmdlets.Count -gt 0) {
127131
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
128132
CreateModelCmdlet($modelCmdlets)

src/SignalR/SignalR.Autorest/create-model-cmdlets.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ function CreateModelCmdlet {
2323
}
2424

2525
$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
26-
$ModuleName = ''
2726
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
2827
$null = New-Item -ItemType Directory -Force -Path $OutputDir
28+
if (''.length -gt 0) {
29+
$ModuleName = ''
30+
} else {
31+
$ModuleName = 'Az.SignalR'
32+
}
2933

3034
$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
3135
$Content = ''
@@ -64,10 +68,10 @@ function CreateModelCmdlet {
6468
$ObjectType = $Model
6569
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
6670
# remove duplicated module name
67-
if ($ObjectType.StartsWith($ModuleName)) {
71+
if ($ObjectType.StartsWith('')) {
6872
$ModulePrefix = ''
6973
} else {
70-
$ModulePrefix = $ModuleName
74+
$ModulePrefix = ''
7175
}
7276
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
7377

@@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}.
158162
.Outputs
159163
${ObjectTypeWithNamespace}
160164
.Link
161-
https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
165+
https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
162166
#>
163167
function New-Az${ModulePrefix}${ObjectType}Object {
164168
[OutputType('${ObjectTypeWithNamespace}')]

src/SignalR/SignalR.Autorest/custom/scripts/New-AzWebPubSubEventHubEndpointObject.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Create an in-memory object for EventHubEndpoint.
2222
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.EventHubEndpoint
25-
.Link
26-
https://learn.microsoft.com/powershell/module/az./new-AzWebPubSubEventHubEndpointObject
2725
#>
2826
function New-AzWebPubSubEventHubEndpointObject
2927
{

src/SignalR/SignalR.Autorest/custom/scripts/New-AzWebPubSubEventNameFilterObject.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Create an in-memory object for EventNameFilter.
2222
2323
.Outputs
2424
Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Models.Api20220801Preview.EventNameFilter
25-
.Link
26-
https://learn.microsoft.com/powershell/module/az./new-AzWebPubSubEventNameFilterObject
2725
#>
2826
function New-AzWebPubSubEventNameFilterObject
2927
{

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ psdemo-wps eastus Standard_S1
9999
## PARAMETERS
100100

101101
### -DefaultProfile
102-
The credentials, account, tenant, and subscription used for communication with Azure.
102+
The DefaultProfile parameter is not functional.
103+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
103104

104105
```yaml
105106
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSubCustomCertificate.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ mycustomcert https://kvcustomcertificatetest.vault.azure.net/ manual-test
7878
## PARAMETERS
7979

8080
### -DefaultProfile
81-
The credentials, account, tenant, and subscription used for communication with Azure.
81+
The DefaultProfile parameter is not functional.
82+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8283

8384
```yaml
8485
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSubCustomDomain.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ mydomain wps.manual-test.dev.signalr.azure.com Succeeded
7878
## PARAMETERS
7979

8080
### -DefaultProfile
81-
The credentials, account, tenant, and subscription used for communication with Azure.
81+
The DefaultProfile parameter is not functional.
82+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8283

8384
```yaml
8485
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSubHub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ testHub deny
8181
## PARAMETERS
8282

8383
### -DefaultProfile
84-
The credentials, account, tenant, and subscription used for communication with Azure.
84+
The DefaultProfile parameter is not functional.
85+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8586

8687
```yaml
8788
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSubKey.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ The example gets the access keys of the Web PubSub resource and then pipes the r
6161
## PARAMETERS
6262

6363
### -DefaultProfile
64-
The credentials, account, tenant, and subscription used for communication with Azure.
64+
The DefaultProfile parameter is not functional.
65+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6566

6667
```yaml
6768
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSubSku.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ We can see from the result that there are two SKUs, one's Tier is "Free", and th
5959
## PARAMETERS
6060

6161
### -DefaultProfile
62-
The credentials, account, tenant, and subscription used for communication with Azure.
62+
The DefaultProfile parameter is not functional.
63+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6364

6465
```yaml
6566
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Get-AzWebPubSubUsage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ The example pipes the result of `Get-AzWebPubSubUsage -Location eastus` to `Form
4848
## PARAMETERS
4949

5050
### -DefaultProfile
51-
The credentials, account, tenant, and subscription used for communication with Azure.
51+
The DefaultProfile parameter is not functional.
52+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5253

5354
```yaml
5455
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/New-AzWebPubSubCustomCertificate.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ Accept wildcard characters: False
5555
```
5656
5757
### -DefaultProfile
58-
The credentials, account, tenant, and subscription used for communication with Azure.
58+
The DefaultProfile parameter is not functional.
59+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5960
6061
```yaml
6162
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/New-AzWebPubSubHub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ Accept wildcard characters: False
9999
```
100100
101101
### -DefaultProfile
102-
The credentials, account, tenant, and subscription used for communication with Azure.
102+
The DefaultProfile parameter is not functional.
103+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
103104
104105
```yaml
105106
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Remove-AzWebPubSub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Accept wildcard characters: False
6565
```
6666
6767
### -DefaultProfile
68-
The credentials, account, tenant, and subscription used for communication with Azure.
68+
The DefaultProfile parameter is not functional.
69+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6970
7071
```yaml
7172
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Remove-AzWebPubSubCustomCertificate.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ $customCert | Remove-AzWebPubSubCustomCertificate
4747
## PARAMETERS
4848

4949
### -DefaultProfile
50-
The credentials, account, tenant, and subscription used for communication with Azure.
50+
The DefaultProfile parameter is not functional.
51+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5152

5253
```yaml
5354
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Remove-AzWebPubSubCustomDomain.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Accept wildcard characters: False
6363
```
6464
6565
### -DefaultProfile
66-
The credentials, account, tenant, and subscription used for communication with Azure.
66+
The DefaultProfile parameter is not functional.
67+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6768
6869
```yaml
6970
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Remove-AzWebPubSubHub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ Accept wildcard characters: False
6767
```
6868
6969
### -DefaultProfile
70-
The credentials, account, tenant, and subscription used for communication with Azure.
70+
The DefaultProfile parameter is not functional.
71+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
7172
7273
```yaml
7374
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Restart-AzWebPubSub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Accept wildcard characters: False
6565
```
6666
6767
### -DefaultProfile
68-
The credentials, account, tenant, and subscription used for communication with Azure.
68+
The DefaultProfile parameter is not functional.
69+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6970
7071
```yaml
7172
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Test-AzWebPubSubNameAvailability.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ True
3838
## PARAMETERS
3939

4040
### -DefaultProfile
41-
The credentials, account, tenant, and subscription used for communication with Azure.
41+
The DefaultProfile parameter is not functional.
42+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
4243

4344
```yaml
4445
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/docs/Update-AzWebPubSub.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ Accept wildcard characters: False
9898
```
9999
100100
### -DefaultProfile
101-
The credentials, account, tenant, and subscription used for communication with Azure.
101+
The DefaultProfile parameter is not functional.
102+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
102103
103104
```yaml
104105
Type: System.Management.Automation.PSObject

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSub.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ param(
9696
[ValidateNotNull()]
9797
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
9898
[System.Management.Automation.PSObject]
99-
# The credentials, account, tenant, and subscription used for communication with Azure.
99+
# The DefaultProfile parameter is not functional.
100+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
100101
${DefaultProfile},
101102

102103
[Parameter(DontShow)]
@@ -148,7 +149,7 @@ begin {
148149
$parameterSet = $PSCmdlet.ParameterSetName
149150

150151
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
151-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
152+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
152153
}
153154
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
154155
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSubCustomCertificate.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ param(
9797
[ValidateNotNull()]
9898
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
9999
[System.Management.Automation.PSObject]
100-
# The credentials, account, tenant, and subscription used for communication with Azure.
100+
# The DefaultProfile parameter is not functional.
101+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
101102
${DefaultProfile},
102103

103104
[Parameter(DontShow)]
@@ -149,7 +150,7 @@ begin {
149150
$parameterSet = $PSCmdlet.ParameterSetName
150151

151152
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
152-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
153+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
153154
}
154155
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
155156
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSubCustomDomain.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ param(
9696
[ValidateNotNull()]
9797
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
9898
[System.Management.Automation.PSObject]
99-
# The credentials, account, tenant, and subscription used for communication with Azure.
99+
# The DefaultProfile parameter is not functional.
100+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
100101
${DefaultProfile},
101102

102103
[Parameter(DontShow)]
@@ -148,7 +149,7 @@ begin {
148149
$parameterSet = $PSCmdlet.ParameterSetName
149150

150151
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
151-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
152+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
152153
}
153154
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
154155
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSubHub.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ param(
100100
[ValidateNotNull()]
101101
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
102102
[System.Management.Automation.PSObject]
103-
# The credentials, account, tenant, and subscription used for communication with Azure.
103+
# The DefaultProfile parameter is not functional.
104+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
104105
${DefaultProfile},
105106

106107
[Parameter(DontShow)]
@@ -152,7 +153,7 @@ begin {
152153
$parameterSet = $PSCmdlet.ParameterSetName
153154

154155
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
155-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
156+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
156157
}
157158
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
158159
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSubKey.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ param(
8585
[ValidateNotNull()]
8686
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
8787
[System.Management.Automation.PSObject]
88-
# The credentials, account, tenant, and subscription used for communication with Azure.
88+
# The DefaultProfile parameter is not functional.
89+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8990
${DefaultProfile},
9091

9192
[Parameter(DontShow)]
@@ -137,7 +138,7 @@ begin {
137138
$parameterSet = $PSCmdlet.ParameterSetName
138139

139140
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
140-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
141+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
141142
}
142143
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
143144
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSubSku.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ param(
5757
[ValidateNotNull()]
5858
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
5959
[System.Management.Automation.PSObject]
60-
# The credentials, account, tenant, and subscription used for communication with Azure.
60+
# The DefaultProfile parameter is not functional.
61+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6162
${DefaultProfile},
6263

6364
[Parameter(DontShow)]
@@ -109,7 +110,7 @@ begin {
109110
$parameterSet = $PSCmdlet.ParameterSetName
110111

111112
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
112-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
113+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
113114
}
114115
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
115116
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/Get-AzWebPubSubUsage.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ param(
5050
[ValidateNotNull()]
5151
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
5252
[System.Management.Automation.PSObject]
53-
# The credentials, account, tenant, and subscription used for communication with Azure.
53+
# The DefaultProfile parameter is not functional.
54+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5455
${DefaultProfile},
5556

5657
[Parameter(DontShow)]
@@ -102,7 +103,7 @@ begin {
102103
$parameterSet = $PSCmdlet.ParameterSetName
103104

104105
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
105-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
106+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
106107
}
107108
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
108109
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/New-AzWebPubSub.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ begin {
276276
$parameterSet = $PSCmdlet.ParameterSetName
277277

278278
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
279-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
279+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
280280
}
281281
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
282282
if ($preTelemetryId -eq '') {

src/SignalR/SignalR.Autorest/exports/New-AzWebPubSubCustomCertificate.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ param(
8282
[ValidateNotNull()]
8383
[Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Category('Azure')]
8484
[System.Management.Automation.PSObject]
85-
# The credentials, account, tenant, and subscription used for communication with Azure.
85+
# The DefaultProfile parameter is not functional.
86+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8687
${DefaultProfile},
8788

8889
[Parameter()]
@@ -146,7 +147,7 @@ begin {
146147
$parameterSet = $PSCmdlet.ParameterSetName
147148

148149
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
149-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
150+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
150151
}
151152
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
152153
if ($preTelemetryId -eq '') {

0 commit comments

Comments
 (0)