PowerShell/AzurePSDrive

Empty siteconfig property under Webapp directory

Opened this issue · 3 comments

A user reported:

From Thom Schumacher
When viewing web applications in my subscription I the property for SiteConfig is empty. I would think that that would be the same value as:
Get-AzureRmWebAppSlot -name webapp -ResourceGroupName myres -slot ‘production’
In the provider my drivename is AZ.
cd az:\mysub\webapps
(gci *webapp).siteconfig
(gci *webapp).sitename — this is valid and has data

CLoudShell Version

PS Azure:\> dir env:acc_version

ACC_VERSION master_20171006.3

Modules

4.4.0 AzureRM
3.4.0 AzureRM.Profile

@thom, the WebApp directory under Azure drive is calling Get-AzureRmWebApp. I also can repro it with the following commands. Thanks for reporting it. I opened a github issue to track it.

#SiteConfig is empty
Get-AzureRmWebApp | % {$_.SiteConfig}                                             

# worked properly
Get-AzureRmWebApp -name JianyunBot| % {$_.SiteConfig}              

According to @ahmedelnably and @markcowl, populating SiteConfig is a separate call, which can be seriously expensive and perf hit. For that consideration, Siteconfig is empty object for now. However Azure cmdlet team is willing to consider to allow user opt in to perf hit case such as -Config. See Azure/azure-powershell#4841

Thank you for your response and for putting the issue I put on the blog site about this... Look forward to what comes next.
thom