PSM HardenTLS.psm1 ERR - SQL Server installation failed. Exit code: -2067922934
Symptom
When running PSMHardening script getting the below errors:
-->"PSM Execute-Stage.ps1 ERR - Hardening stage completed with the following script/s failure:
HardenTLS ".
--->"PSM Execute-Stage.ps1 INF - Please see the log for more details.
You can run the failed steps separately, automatically by disabling all other steps,
or manually, in order to complete the installation."
--->In PSMHardening-Log
"PSM HardenTLS.psm1 INF - Installing SQL Server...
PSM HardenTLS.psm1 ERR - SQL Server installation failed. Exit code: -2067922934 for more information you can see the logs in C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log or look for file SQLEXPR_x64_ENU_decompression_log.log on the machine"
Environment
11.7;12.0;12.1;12.2 Privileged Access Manager (PAM, self-hosted) PSM;Privileged Session Management (PSM) PSM
Cause
If you are running the setup as a local administrator, you require the following user rights for the setup to run successfully.
The account that is running SQL Server Setup does not have one or all of the following rights: the right to back up files and directories, the right to manage auditing and the security log, and the right to debug programs.
To continue, use an account with both of these rights. For more information, see http://msdn.microsoft.com/en-us/library/ms813696.aspx, http://msdn.microsoft.com/en-us/library/ms813959.aspx, and http://msdn.microsoft.com/en-us/library/ms813847.aspx.
Resolution
To add the rights to the setup account, follow these steps:
-
Log on as an administrator.
-
Select Start > Run, type Control admintools, and then select OK.
-
Double-click "Local Security Policy".
-
In the Local Security Settings dialog box, select Local Policies, open User Rights Assignment, and then double-click Backup Files and Directories.
-
In the Backup Files and Directories Properties dialog box, select Add User or Group.
-
In the Select User or Groups dialog box, enter the user account that you want to use for setup, and then select OK two times.
-
From the File menu, open the Local Security Settings dialog box, and then select Exit to close.
Note:
--To add the user account for the Debug Programs and Manage auditing and security log policies, perform steps 1 through 6.
--If the policies are enforced at the domain level then you need to change in Domain GPO.