workflow ProcessTabularModel
{ param
(
# Fully-qualified name of the Azure AS server
[parameter(Mandatory=$true)]
[string] $AzureASName = "asazure://xxxxxxx.asazure.windows.net/yyyyyyyyy",
# DB Name
[parameter(Mandatory=$true)]
[string] $DataBaseName = "zzzzzzzz",
# Credentials for $AzureASName stored as an Azure Automation credential asset
# When using in the Azure Automation UI, please enter the name of the credential asset for the "Credential" parameter
[parameter(Mandatory=$true)]
[PSCredential] $AzureASCredential
)
inlinescript
{
# "Importing the SqlServer PowerShell module ...."
import-module SqlServer
"Processing DB=[$($using:databasename)] on Server=[$($using:AzureASName)]. Started at: $(Get-date)"
Invoke-ProcessASDatabase -databasename $using:databasename -server $using:AzureASName –RefreshType "Full" -credential $using:AzureASCredential
"Completed at: $(get-date)"
}
}
{ param
(
# Fully-qualified name of the Azure AS server
[parameter(Mandatory=$true)]
[string] $AzureASName = "asazure://xxxxxxx.asazure.windows.net/yyyyyyyyy",
# DB Name
[parameter(Mandatory=$true)]
[string] $DataBaseName = "zzzzzzzz",
# Credentials for $AzureASName stored as an Azure Automation credential asset
# When using in the Azure Automation UI, please enter the name of the credential asset for the "Credential" parameter
[parameter(Mandatory=$true)]
[PSCredential] $AzureASCredential
)
inlinescript
{
# "Importing the SqlServer PowerShell module ...."
import-module SqlServer
"Processing DB=[$($using:databasename)] on Server=[$($using:AzureASName)]. Started at: $(Get-date)"
Invoke-ProcessASDatabase -databasename $using:databasename -server $using:AzureASName –RefreshType "Full" -credential $using:AzureASCredential
"Completed at: $(get-date)"
}
}
Thank you for providing the valuable information.
ReplyDeleteMS Azure Online Training