Closed nShanmugaraj closed 6 years ago
You need to install Azure PowerShell : https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-6.4.0
Thanks for the quick response. Its working now.. connected to Azure portal Now i am executing LabDeploy.ps1 , got the below error
PS C:\Windows\system32> E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1 Lab deployment starting.... PackageManagement\Install-Package : The following commands are already available on this system:'Add-RoleMember,Add-SqlAvailabilityDa tabase,Add-SqlAvailabilityGroupListenerStaticIp,Add-SqlFirewallRule,Backup-ASDatabase,Backup-SqlDatabase,Convert-UrnToPath,Decode-Sql Name,Disable-SqlAlwaysOn,Enable-SqlAlwaysOn,Encode-SqlName,Get-SqlCredential,Get-SqlDatabase,Get-SqlInstance,Get-SqlSmartAdmin,Invoke -ASCmd,Invoke-PolicyEvaluation,Invoke-ProcessCube,Invoke-ProcessDimension,Invoke-ProcessPartition,Invoke-Sqlcmd,Join-SqlAvailabilityG roup,Merge-Partition,New-RestoreFolder,New-RestoreLocation,New-SqlAvailabilityGroup,New-SqlAvailabilityGroupListener,New-SqlAvailabil ityReplica,New-SqlBackupEncryptionOption,New-SqlCredential,New-SqlHADREndpoint,Remove-RoleMember,Remove-SqlAvailabilityDatabase,Remov e-SqlAvailabilityGroup,Remove-SqlAvailabilityReplica,Remove-SqlCredential,Remove-SqlFirewallRule,Restore-ASDatabase,Restore-SqlDataba se,Resume-SqlAvailabilityDatabase,Set-SqlAuthenticationMode,Set-SqlAvailabilityGroup,Set-SqlAvailabilityGroupListener,Set-SqlAvailabi lityReplica,Set-SqlCredential,Set-SqlHADREndpoint,Set-SqlNetworkConfiguration,Set-SqlSmartAdmin,Start-SqlInstance,Stop-SqlInstance,Su spend-SqlAvailabilityDatabase,Switch-SqlAvailabilityGroup,Test-SqlAvailabilityGroup,Test-SqlAvailabilityReplica,Test-SqlDatabaseRepli caState,Test-SqlSmartAdmin'. This module 'SqlServer' may override the existing commands. If you still want to install this module 'SqlServer', use -AllowClobber parameter. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.PackageManagement.
Cmdlets.InstallPackage
You can add the -AllowClobber parameter to "Install-Module -Name SqlServer -Scope CurrentUser", or just comment it out with #
Do you mean
Install-Module -Name SqlServer -Scope CurrentUser -AllowClobber
Also can you let me know $sqlUsername = "labadmin" do i need to create any sql server related things in Azure. This is my new Azure Account , i dont have any apps installed till now
Yes.
No, the script creates objects for you after you fill in the parameters.
Every time i execute , i am getting below message and an SQL is installed. can you give me the fix for this
Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
Error 1 --------
adflabstoragetqoqa New-AzureStorageContainer : Container 'input' already exists. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:47 char:44
+ CategoryInfo : ResourceExists: (:) [New-AzureStorageContainer], ResourceAlreadyExistException
+ FullyQualifiedErrorId : ResourceAlreadyExistException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.NewAzureStorageContainerCommand
New-AzureStorageContainer : Container 'output' already exists. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:47 char:44
+ CategoryInfo : ResourceExists: (:) [New-AzureStorageContainer], ResourceAlreadyExistException
+ FullyQualifiedErrorId : ResourceAlreadyExistException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.NewAzureStorageContainerCommand
New-AzureStorageContainer : Container 'blobsource' already exists. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:47 char:44
+ CategoryInfo : ResourceExists: (:) [New-AzureStorageContainer], ResourceAlreadyExistException
+ FullyQualifiedErrorId : ResourceAlreadyExistException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.NewAzureStorageContainerCommand
New-AzureStorageContainer : Container 'backups' already exists. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:47 char:44
+ CategoryInfo : ResourceExists: (:) [New-AzureStorageContainer], ResourceAlreadyExistException
+ FullyQualifiedErrorId : ResourceAlreadyExistException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.NewAzureStorageContainerCommand
Error 2 -----------
Set-AzureStorageBlobContent : Can not find the specified file 'E:\Daywise content\Day4\ADFLab-Master\Deployment\Files\input\FAAMaster\FAAmaster.txt'. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:56 char:1
+ CategoryInfo : InvalidArgument: (:) [Set-AzureStorageBlobContent], ArgumentException
+ FullyQualifiedErrorId : ArgumentException,Microsoft.WindowsAzure.Commands.Storage.Blob.SetAzureBlobContentCommand
Error 3 -----------
: FAAaircraft/FAAaircraft.txt
Set-AzureStorageBlobContent : Can not find the specified file 'E:\Daywise content\Day4\ADFLab-Master\Deployment\Files\backups\AirlinePerformance-OLTP.bacpac'. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:60 char:1
+ CategoryInfo : InvalidArgument: (:) [Set-AzureStorageBlobContent], ArgumentException
+ FullyQualifiedErrorId : ArgumentException,Microsoft.WindowsAzure.Commands.Storage.Blob.SetAzureBlobContentCommand
Error 3-A -----------
New-AzureRmSqlDatabaseImport : 0: There was an error that occurred during this operation : '
+ CategoryInfo : CloseError: (:) [New-AzureRmSqlDatabaseImport], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.NewAzureSqlDatabaseImport
Error 4 -------
The property 'OperationStatusLink' cannot be found on this object. Verify that the property exists. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:102 char:1
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
**Error 5 ----------- OLTP DB Restoring... The variable '$importStatus' cannot be retrieved because it has not been set. At E:\Daywise content\Day4\adflab-master\Deployment\LabDeploy.ps1:104 char:8
+ CategoryInfo : InvalidOperation: (importStatus:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined**
I am new to PowerShell scrips. In LAB 1 -Part 1 , i am unable to link to PowerShell Run Script and connect to my Azure Account. Getting the error `PS SQLSERVER:>
Prompt for Azure credentials
Login-AzureRmAccount Login-AzureRmAccount : The term 'Login-AzureRmAccount' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:3 char:1