faustf Posted May 15, 2018 Posted May 15, 2018 hi guys , i have a problem with powershell and shadow copy , in practical, i want do a snapshot , mount it , and do a backup i have create a script #AutoIt3Wrapper_Compression=3 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_Add_Constants=n #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Array.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <WinAPIFiles.au3> #include <File.au3> #include <Date.au3> #include <FileConstants.au3> #include <Process.au3> _ShadowCopyON() Func _ShadowCopyON() Local $iFileExists = FileExists(@SystemDir & "\WindowsPowerShell") If $iFileExists Then ;Runwait('powershell.exe (Get-WmiObject -list win32_shadowcopy).Create("C:\","ClientAccessible") > c:\temp\ps_create.txt', '', @SW_HIDE) ;Runwait(@ComSpec & 'powershell.exe (Get-WmiObject -list win32_shadowcopy).Create("C:\","ClientAccessible") > c:\temp\ps_create.txt', '') RunWait(@ComSpec & ' /k powershell.exe (Get-WmiObject -list win32_shadowcopy).Create("C:\","ClientAccessible") > c:\temp\ps_create.txt | more') Else MsgBox($MB_SYSTEMMODAL, "", "Windows Powershell non esiste devi scaricarlo" & @CRLF & "FileExist returned: " & $iFileExists) ShellExecute("https://www.microsoft.com/it-IT/download/confirmation.aspx?id=16818") ; powershell download for windows xp EndIf but when i try to runwait always give me this error (a powershell command ) The string starting: At line:1 char:49 + (Get-WmiObject -list win32_shadowcopy).Create(C: <<<< ",ClientAccessible) is missing the terminator: ". At line:1 char:70 + (Get-WmiObject -list win32_shadowcopy).Create(C:",ClientAccessible) <<<< + CategoryInfo : ParserError: (,ClientAccessible) :String) [], P arentContainsErrorRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString if i run it at heand work o_O someone can help me?? thankzz at all
Moderators JLogan3o13 Posted May 16, 2018 Moderators Posted May 16, 2018 Moved to PowerShell forum The error is telling you what is wrong... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now