Greetings,
I am in the middle of moving databases and log files to larger drives. I know the command to use and it works quite well, but is there a way, in a ps1 script of always answering yes to the confirmation questions?
I'd like to let this script run overnight.
Thanks.
You can use the -force switch in the move-databasepath and move-storagegrouppath cmdlets which should suppress prompts.
- Joel
Odd, that seems like it should work. It didn't. Here is the command I am using:
Move-DatabasePath -Identity nb-ws-sv-0015\b -EdbFilePath N:\DB\b\b.edb -Force
I have tried moving the -Force switch around in the line, to no avail.
Any other ideas out there?
In addition to using "the force", also use -Confirm:$false. This will perform the task without prompting you.
Thanks,
I'll try that as soon as this database is finished migrating... I thought $false may come into play somewhere, but it didn't like it after -Force...
:)