Hi guys
I want to make daily backup, I want to rename as :
"dbOperacional-25/08/2017-11:41.bak", But it doesn't work.
After make the backup, it is:
SUPORTE03-MSSQL12.SQLEXPRESS-dbOperacional-131481460260556509.bak
My script is:
Get-ChildItem "d:\teste\*.bak" | ForEach-Object {
Rename-Item $_.FullName "$BackupFolder$($_.BaseName -replace "SUPORTE03-MSSQL12.SQLEXPRESS-", """)$(-replace (Get-Date -Format "dd-MM-yyyy") |Where { $_.Name -like "d*" -and "*.bak"}.bak"}
I still did not insert the time.
There is someone to help me ?