Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Run a Dos command in Powershell

$
0
0

Hi,

It seems like an easy question but it appears there are lots of ways to do this.  I've been trying to run some dos commands to run NTBackup using start-process and arguments but the arguments are being passed in the wrong format and I can't see where.  Is there any other way to run this simple command.  Here is my previous link http://social.technet.microsoft.com/Forums/windowsserver/en-US/b92541c4-83ce-4740-a3c5-1bb776a5c00d/running-ntbackup-with-startprocess

c:\windows\system32\ntbackup.exe backup @(Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\chameme.bks`"" ,"/n `"1file.bkf1 created 06/09/2013 at 09:36`"" ,"/d `"Set created 06/09/2013 at 09:36`" "," /v:no", "/r:no" ,  "/rs:no" ,  "/hc:off", "/m normal", "/j `"chameme`""," /l:s"," /f `"\\fs1\Exchange Backups$\1file.bkf`"")

My only requirement is that I need to datestamp the file name with the date as NTBackup can't do anything like this...  I have some cloud backup software that doesn't like massive files so this is why I need individually date stamped files from the backup.

Thanks

james


Alter De Ruine


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>