Script to Automate Implementation of Security & Compliance Analyzer Recommendations
| KB ID: | 4525 |
| Product: | Veeam Backup & Replication | 12.1 | 12.2 | 12.3 | 12.3.1 | 12.3.2 | 13 |
| Published: | 2023-12-14 |
| Last Modified: | 2026-02-25 |
Purpose
This article provides information regarding automating the configuration of the Veeam Backup Server according to practices suggested in the Security & Compliance Analyzer.
The script on this page is provided to expedite the implementation of Security & Compliance Analyzer recommendations. It was created by Veeam's development team and will be updated as further Security & Compliance recommendations are added to Veeam Backup & Replication.
Solution
It is critical that you understand what this script does and the impact it will have.
Automated Script Limitations and Considerations
- The script only applies missing security best practices found on the machine where Veeam Backup & Replication is installed, where the script is run from. The script will not apply security best practices to any other machine.
- If MFA is enabled for your account, PowerShell commands cannot be run. For more information, review KB4535: Veeam PowerShell Command Fails With: "Unable to connect to the server with MFA-enabled user account."
- Some of the practices apply security settings that might affect other applications. For example, the script will attempt to disable SSL 2.0 on a server, which will cause other applications that depend on SSL 2.0 to fail.
- Some of the practices apply security settings that might cause server lockdown. For example, the script may attempt to disable Remote Desktop Services (TermService), restricting RDP access to the server; it may also disable Windows Remote Management (WinRM service), which, when disabled, may cause problems with external management of the server.
Note: Direct RDP access is not required to manage Veeam Backup & Replication. The Veeam Backup & Replication console can be installed on any Windows machine and be used to connect and manage the Veeam Backup & Replication deployment. Additionally, starting with Veeam Backup & Replication v13, the Web UI is available. - The script will not process Suppressed entries within the Security & Compliance Analyzer UI. Before using the apply option in the script, compare the report output of the script to the entries in the UI and suppress any security recommendations you do not want the script to attempt to remediate.
Note: If you suppress any options after the script has generated its report, use option 1 to refresh the compliance report so that the script acknowledges the suppressed option(s). - This script does not have an undo option. Once changes are made, if you wish to revert those changes, you must do so manually.
- The entry for "Deprecated versions of SSL and TLS should be disabled", will only be listed with a "Passed" or "Not implemented" status if specific registry keys with specific values exist. For more information, see this Microsoft article. If the registry key does not exist, the parameter will have the "Unable to detect" status.
Automated Script Usage
The PowerShell script must be run in an elevated PowerShell console on the Veeam Backup Server using an account with local administrator permissions.
Script Explanation
- The script will connect to the local instance of Veeam Backup & Replication.
- The script will trigger a new session of the Security & Compliance Analyzer.
- The script will wait 10 seconds and then collect verification statuses.
- The script will determine the status for each of the suggested configurations and find which suggested best practices require remediation that the script can assist with.
- The script will output the results in the PowerShell console.
- The script will prompt the user to select a course of action:
- 1: Refresh compliance report
- 2: Apply ALL recommended configurations
- 3: Apply selected configuration only...
- 0: Exit
- Selecting option #2 will cause the script to attempt automatic remediation of all entries listed as:
Not implemented (Use 'Apply Configurations' option to fix)
Note: Entries that are suppressed within the Security & Compliance Analyzer UI will be listed as "Suppressed" but will NOT be fixed using the script. - Option #3 will trigger the prompt for the recommendation ID listed in the compliance report. The script will attempt the remediation of the entry with the specified ID only.
- After applying remediation actions, results will be displayed in the console.
Example Screenshots
Download Information
Customers are strongly encouraged to review the entire article to ensure they understand how this script functions and the impacts it may have.
For example, unless suppressed within the Security & Compliance Analyzer, this script will implement the Security & Compliance Analyzer recommendation to disable Remote Desktop Services.
Veeam Support will not assist with OS or third-party software issues resulting from executing this script.
Script for Veeam Backup & Replication 13
PowerShell Execution Policy
The default PowerShell execution is RemoteSigned, which will block the execution of the script as it is not signed.
To run the script without modifying the system's execution policy, use the following command:
Script for Veeam Backup & Replication 12
PowerShell Execution Policy
The default PowerShell execution is RemoteSigned, which will block the execution of the script as it is not signed.
To run the script without modifying the system's execution policy, use the following command:
If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.