Skip to content

Commit 8fe0504

Browse files
author
Vini Soto
committed
Removing PSSession cmdlets from current PR
1 parent eebc5a0 commit 8fe0504

File tree

15 files changed

+5
-396
lines changed

15 files changed

+5
-396
lines changed

src/ResourceManager/Profile/Commands.Profile/AzureRmAlias/Mappings.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,7 @@ public static Dictionary<string, object> GetCaseInsensitiveMapping()
771771
'New-AzWebApp': 'New-AzureRmWebApp',
772772
'Restore-AzDeletedWebApp': 'Restore-AzureRmDeletedWebApp',
773773
'Get-AzDeletedWebApp': 'Get-AzureRmDeletedWebApp',
774-
'Enter-AzWebAppContainerPSSession': 'Enter-AzureRmWebAppContainerPSSession',
775-
'Get-AzWebAppContainerContinuousDeploymentUrl': 'Get-AzureRmWebAppContainerContinuousDeploymentUrl',
776-
'New-AzWebAppContainerPSSession': 'New-AzureRmWebAppContainerPSSession'
774+
'Get-AzWebAppContainerContinuousDeploymentUrl': 'Get-AzureRmWebAppContainerContinuousDeploymentUrl'
777775
},
778776
'Az.Maps': {
779777
'Get-AzMapsAccountKey': 'Get-AzureRmMapsAccountKey',

src/ResourceManager/Websites/Commands.Websites.Test/ScenarioTests/WebAppTests.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,7 @@ function Test-EnableContainerContiniousDeploymentAndGetUrl
611611
$ontainerRegistryUser = "testregistry"
612612
$pass = "7Dxo9p79Ins2K3ZU"
613613
$containerRegistryPassword = ConvertTo-SecureString -String $pass -AsPlainText -Force
614-
$dockerPrefix = "DOCKER|"
615-
$expected_ci_url = "https://`$ps7234:dBm0r9w8PeZiv0rPyteQdmgrjCgljKz0QzDk448zg61gfgG90vdfoEuB2kSh@ps7234.scm.azurewebsites.net/docker/hook"
614+
$dockerPrefix = "DOCKER|"
616615
try
617616
{
618617
#Setup

src/ResourceManager/Websites/Commands.Websites/Az.Websites.psd1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ CmdletsToExport = 'Get-AzAppServicePlan', 'Set-AzAppServicePlan',
9797
'Set-AzWebApp', 'Start-AzWebApp', 'Stop-AzWebApp',
9898
'Get-AzWebAppSnapshot', 'Restore-AzWebAppSnapshot',
9999
'Get-AzDeletedWebApp', 'Restore-AzDeletedWebApp',
100-
'Enter-AzWebAppContainerPSSession', 'Get-AzWebAppContainerContinuousDeploymentUrl',
101-
'New-AzWebAppContainerPSSession'
100+
'Get-AzWebAppContainerContinuousDeploymentUrl'
102101

103102
# Variables to export from this module
104103
# VariablesToExport = @()

src/ResourceManager/Websites/Commands.Websites/AzureRM.Websites.psd1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ CmdletsToExport = 'Get-AzureRmAppServicePlan', 'Set-AzureRmAppServicePlan',
9797
'Set-AzureRmWebApp', 'Start-AzureRmWebApp', 'Stop-AzureRmWebApp',
9898
'Get-AzureRmWebAppSnapshot', 'Restore-AzureRmWebAppSnapshot',
9999
'Get-AzureRmDeletedWebApp', 'Restore-AzureRmDeletedWebApp',
100-
'Enter-AzureRmWebAppContainerPSSession', 'Get-AzureRmWebAppContainerContinuousDeploymentUrl',
101-
'New-AzureRmWebAppContainerPSSession'
100+
'Get-AzureRmWebAppContainerContinuousDeploymentUrl'
102101

103102
# Variables to export from this module
104103
# VariablesToExport = @()

src/ResourceManager/Websites/Commands.Websites/ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
## Current Release
2121
* New-AzureRmAppServicePlan -HyperV switch is added for create app service plan with windows container
2222
* New-AzureRmWebApp/ New-AzureRmWebAppSlot/ Set-AzureRmWebApp/ Set-AzureRmWebAppSlot - New parameters (–ContainerRegistryUser string -ContainerRegistryPassword secureString -EnableContainerContinuousDeployment) added for creating and managing windows container app
23-
* New Cmdlets Enter-AzureRmWebAppContainerPSSession, New-AzureRmWebAppContainerPSSession for entering and creating remote PSSession in container web app
2423
* New Cmdlet Get-AzureRMWebAppContainerContinuousDeploymentUrl - Gets the Container Continuous Deployment Webhook URL
2524

2625
## Version 5.1.0
2726
* Updating to use the latest .NET SDK version (2.0.0)
2827
* Added two new cmdlets: Get-AzureRmDeletedWebApp and Restore-AzureRmDeletedWebApp
28+
* New Cmdlet Get-AzureRMWebAppContainerContinuousDeploymentUrl - Gets the Container Continuous Deployment Webhook URL
2929

3030
## Version 5.0.9
3131
* Fixed issue with default resource groups not being set.

src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/EnterAzureRmWebAppContainerPSSession.cs

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/ResourceManager/Websites/Commands.Websites/Cmdlets/WebApps/NewAzureRmWebAppContainerPSSession.cs

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,11 @@
8282
<Compile Include="Cmdlets\BackupRestore\GetAzureWebAppBackupConfiguration.cs" />
8383
<Compile Include="Cmdlets\BackupRestore\GetAzureWebAppBackupList.cs" />
8484
<Compile Include="Cmdlets\DeploymentSlots\SwitchAzureWebAppSlot.cs" />
85-
<Compile Include="Cmdlets\WebApps\EnterAzureRmWebAppContainerPSSession.cs" />
8685
<Compile Include="Cmdlets\WebApps\GetAzureRMWebAppContainerContinuousDeploymentUrl.cs" />
8786
<Compile Include="Cmdlets\WebApps\GetAzureWebAppMetrics.cs" />
8887
<Compile Include="Cmdlets\WebApps\GetAzureWebAppPublishingProfile.cs" />
8988
<Compile Include="Cmdlets\WebApps\GetAzureWebApp.cs" />
9089
<Compile Include="Cmdlets\BackupRestore\NewAzureWebAppBackup.cs" />
91-
<Compile Include="Cmdlets\WebApps\NewAzureRmWebAppContainerPSSession.cs" />
9290
<Compile Include="Cmdlets\WebApps\RemoveAzureWebApp.cs" />
9391
<Compile Include="Cmdlets\WebApps\NewAzureWebApp.cs" />
9492
<Compile Include="Cmdlets\BackupRestore\RemoveAzureWebAppBackup.cs" />

src/ResourceManager/Websites/Commands.Websites/Properties/Resources.Designer.cs

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/Websites/Commands.Websites/Properties/Resources.resx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,4 @@
162162
<value>Failed to add git remote to directory '{0}' with error '{1}'</value>
163163
<comment>{0} = directory, {1} = error message</comment>
164164
</data>
165-
<data name="EnterPSSessionWarning" xml:space="preserve">
166-
<value>This will modify LocalHost\Client\TrustedHosts and LocalHost\Client\Auth policy. Continue?</value>
167-
</data>
168165
</root>

src/ResourceManager/Websites/Commands.Websites/Utilities/WebsitesClient.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -280,24 +280,6 @@ public User GetPublishingCredentials(string resourceGroupName, string webSiteNam
280280
WrappedWebsitesClient.WebApps().ListPublishingCredentialsSlot(resourceGroupName, webSiteName, slotName)
281281
: WrappedWebsitesClient.WebApps().ListPublishingCredentials(resourceGroupName, webSiteName);
282282
}
283-
public void RunWebAppContainerPSSessionScript(PSCmdlet cmdlet, string resourceGroupName, string webSiteName, string slotName = null, bool newPSSession = false)
284-
{
285-
Site site = GetWebApp(resourceGroupName, webSiteName, slotName);
286-
User user = GetPublishingCredentials(resourceGroupName, webSiteName, slotName);
287-
const string webAppContainerPSSessionVarPrefix = "webAppPSSession";
288-
string publishingUserName = user.PublishingUserName.Length <= 20 ? user.PublishingUserName : user.PublishingUserName.Substring(0, 20);
289-
string psSessionScript = string.Format("${3}User = '{0}' \n${3}Password = ConvertTo-SecureString -String '{1}' -AsPlainText -Force \n" +
290-
"${3}Credential = New-Object -TypeName PSCredential -ArgumentList ${3}User, ${3}Password\nSet-Item WSMAN:\\LocalHost\\Client\\Auth\\Basic -Value $true \n" +
291-
"Set-Item WSMAN:\\LocalHost\\Client\\TrustedHosts -Value {2} -Force\n" +
292-
(newPSSession ? "${3}NewPsSession = New-PSSession" : "Enter-PSSession") + " -ConnectionUri https://{2}/WSMAN -Authentication Basic -Credential ${3}Credential \n",
293-
publishingUserName, user.PublishingPassword, site.DefaultHostName, webAppContainerPSSessionVarPrefix);
294-
cmdlet.ExecuteScript<object>(psSessionScript);
295-
if (newPSSession)
296-
{
297-
cmdlet.WriteObject(cmdlet.GetVariableValue(string.Format("{0}NewPsSession", webAppContainerPSSessionVarPrefix)));
298-
}
299-
cmdlet.ExecuteScript<object>(string.Format("Clear-Variable {0}*", webAppContainerPSSessionVarPrefix)); //Clearing session variable
300-
}
301283

302284
public string ResetWebAppPublishingCredentials(string resourceGroupName, string webSiteName, string slotName)
303285
{

src/ResourceManager/Websites/Commands.Websites/help/AzureRM.Websites.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ ARM (Azure Resource Manager) Web App and App Service Plan commands.
1414
### [Edit-AzureRmWebAppBackupConfiguration](Edit-AzureRmWebAppBackupConfiguration.md)
1515
Modifies an Azure Web App backup schedule.
1616

17-
### [Enter-AzureRmWebAppContainerPSSession](Enter-AzureRmWebAppContainerPSSession.md)
18-
Creates and enters a remote PowerShell session into a container web app
19-
2017
### [Get-AzureRmAppServicePlan](Get-AzureRmAppServicePlan.md)
2118
Gets an Azure App Service plan in the specified resource group.
2219

@@ -77,9 +74,6 @@ Creates an Azure Web App.
7774
### [New-AzureRmWebAppBackup](New-AzureRmWebAppBackup.md)
7875
Creates an Azure Web App backup.
7976

80-
### [New-AzureRmWebAppContainerPSSession](New-AzureRmWebAppContainerPSSession.md)
81-
Creates a new remote PowerShell session into a container app
82-
8377
### [New-AzureRmWebAppDatabaseBackupSetting](New-AzureRmWebAppDatabaseBackupSetting.md)
8478
Creates an Azure Web App database backup setting to be used with New-AzureRmWebAppBackup.
8579

src/ResourceManager/Websites/Commands.Websites/help/Enter-AzureRmWebAppContainerPSSession.md

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)