--https://www.sqlservercentral.com/scripts/generate-restore-database-script-without-using-cmdshell Use this script to generate RESTORE DATABASE scripts for all .BAK ...
You've automated the SQL database backup process; now, let's restore in auto mode. Here's how to do it with PowerShell. In my last post, I demonstrated a script that can execute backups for a server.