Unable to execute Import-Module Azure PowerShell Command - powershell

I am trying to import Azure module from Azure using windows powershell but I am facing the following error
The following error occurred while loading the extended type data
file: , C:\Program
Files\WindowsPowerShell\Modules\Azure\5.3.0\Services\Microsoft.WindowsAzure.Commands.Websites.Types.ps1xml:
The file was skipped because of the following validation exception:
File C:\Program
Files\WindowsPowerShell\Modules\Azure\5.3.0\Services\Microsoft.WindowsAzure.Commands.Websites.Types.ps1xml
cannot be loaded because its operation is blocked by software
restriction policies, such as those created by using Group Policy
any help please.

Related

Could not deploy package. Unable to connect to master or target server. You must have a user with the same password in master or target server

I am using self Hosted Agent (Windows 2019) with SQL Server 2019 in Azure DevOps. I am using "SQL Server database deploy" Task. And trying to deploy a dacpac with the database project created using VS2019. I am getting an error as
"Could not deploy package. Unable to connect to master or target server. You must have a user with the same password in master or target server."
When I check the task log, SQLPackage.exe was executed from the below path.
"C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe"
But DAC folder is missing in the below path
"C:\Program Files (x86)\Microsoft SQL Server\150"
When I check the capabilities of agent pool, it showing the path of SQLPackage as
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\SQLPackage.exe".
But SQLPackage.exe is also available in the below path
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150"
Some links says it was known issue. And some links suggest to use Powershell task instead of "SQL Server database deploy" Task.
Please anyone let me know how to fix this issue.
What do you mean 'SQL Server database deploy Task' the WinRM SQL Server DB Deployment task or Azure SQL Database Deployment task?
Here, about your issue, we have some suggestions:
Make sure SQL Server is running
Use the correct SQL Server connection name
Double-check SQL Server username/password
SQL Server user needs correct server role
Try to upgrade the Microsoft.SqlServer.DacFx.x64 package from 140.3745.1 to latest stable.
Or you can try to Change the dacpac compatibility from 150 to 140.

Azure SQL Database DevOps Release pipeline returns Error CREATE DATABASE permission denied

I have created build and release pipelines for Azure SQL Database according to these instructions.
I am able to publish my database project directly from Visual Studio.
My Build pipeline works without problems.
However on release pipeline I am getting the following error:
Error SQL72014: .Net SqlClient Data Provider: Msg 262, Level 14, State 1, Line 1 CREATE DATABASE permission denied in database 'master'.
Error SQL72045: Script execution error. The executed script:
CREATE DATABASE [$(Datab
aseName)] COLLATE SQL_Latin1_General_CP1_CI_AS;
Any idea what I may be doing wrong or how to find where the problem is?
Feeling a bit stupid right about now. I finally found how to debug the pipeline (variable system.debug = true) and it was telling me that it can't find the database defined. Which I had mistyped.
However the error without the debugging option was NOT helpful :D So if anyone is getting this error they should recheck connection information.

SSAS Restore - Full server path location Issue / Server/Folder Permissions

Any help would be appreciated. I am failing to restore an SSAS cube when the full server path to the folder is provided in the code.
The SSAS cube restore works when I give the normal drive path to the code (eg. F:\OLAP) but when I assign the server-name to the same shared folder (\servername\F\OLAP) then the following error is generated:
[Analysis Services Execute DDL Task] Error: File system error: The following error occurred during a file operation: Cannot create a file when that file already exists. . (\\servername\F\OLAP\28AEC4E6A0A74DF88A3F\CUBE.5.db).
The code is similar to the one below and has the AllowOverwrite property yo 'true'
<Restore xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<File>\\10.10.10.10\e\Live\DWH\OLAP_backup.abf</File>
<DatabaseName>OLAP</DatabaseName>
<AllowOverwrite>true</AllowOverwrite>
<DbStorageLocation xmlns="http://schemas.microsoft.com/analysisservices/2008/engine/100/100">F:\OLAP\</DbStorageLocation>
</Restore>
I am not sure how if any of you have already come across this and know of the root cause or easy fix?
Thank you

Replace Existing File with Temp File:I/O Error

I have an Access 2007 database from which I call a Windows batch file to retrieve files from an external server via a ribbon menu. When executing the file manually everything works just fine. When executing the batch file via the Access ribbon menu the following error appears within the command line:
Opening data connection for ...
> Replace Existing File with Temp File:I/O Error
Binary transfer complete.
I've read something about this error in relation to (Admin) rights, but since the batch file actually runs when called by Access it not seems to be the issue.

Access is denied while executing aspnet_regbrowsers.exe

For one of our requirement, we had to modify the ie.browser and web.config files (%windir%\microsoft.Net\Framework64\v2.0.50727\CONFIG\Browsers and %windir%\microsoft.Net\Framework64\v2.0.50727\CONFIG). After modifying these files, when I execute aspnet_regbrowsers.exe, we are getting access denied error. Following is the error message:
ASPRUNTIME: Access is denied. (Exception from HRESULT: 0x80070005(E_ACCESSDENIED))
I have executed aspnet_regbrowsers.exe (available at %windir%\microsoft.Net\Framework64\v2.0.50727) from command prompt under administrative privileges. I am facing this on windows server 2008 R2 x64 bit.
Any help is appreciated.
Thanks.