Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param (
- [Parameter(Position=0,mandatory=$true)]
- [string] $AADAppID,
- [Parameter(Position=1,mandatory=$true)]
- [string] $AADKey,
- [Parameter(Position=2,mandatory=$true)]
- [string] $TenantId,
- [Parameter(Position=3,mandatory=$true)]
- [string] $ResourceGroupName,
- [Parameter(Position=4,mandatory=$true)]
- [string] $ServerName,
- [Parameter(Position=5,mandatory=$true)]
- [string] $RGLocation,
- [Parameter(Position=6,mandatory=$true)]
- [string] $WebAppName,
- [Parameter(Position=7,mandatory=$true)]
- [string] $SubscriptionName
- )
- # Connect to Azure
- $ssAADKey = ConvertTo-SecureString $AADKey -AsPlainText -Force
- $psCredential = New-Object System.Management.Automation.PSCredential($AADAppID, $ssAADKey)
- Connect-AzureRmAccount -ServicePrincipal -Credential $psCredential -Subscription $SubscriptionName -TenantId $TenantId
- $WebAppName = $WebAppName.Split(',')
- Foreach ($servicename in $WebAppName)
- {
- write-host $servicename
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement