Hello everyone
I need to restore almost 100 backup put on a folder through a single script
for that I try to script these 3 lines but the powershell it makes me return errors that can correct me
$databases=Get-ChildItem -path C:\folder -Filter *.bak
foreach($database in $databases)
{
Restore-SqlDatabase -ServerInstance .\sqlprod -Database $database -BackupFile $database.fullname
}
thank you