Posts

Showing posts with the label Import

Importing Scheduled Task using Powershell

Today's topic? Powershell and Scheduled Tasks! Powershell provides a much more friendlier way to interact with scheduled task using the ScheduledTask module than the sc.exe does, but lets go through the cmdlets in that module. First we have the Enable/Disable-ScheduledTask that are used in order to enable or disable a task. Then there are the Start/Stop-ScheduledTask that start or stop a task when it's running. We can use the Register/UnRegister-ScheduledTask in order to add or remove a task and Export-ScheduledTask in order to export a task to an XML file. Let me add a command that I find very useful when it comes to importing tasks from a file here: Register-ScheduledTask -Xml ( Get-Content 'C:\Temp\MyTask.xml' | Out-String ) ` -TaskName "MyTask" ` -User 'user' ` -Password 'password' – Force First we get the content of the MyTask.xml file and then we regist...

VMware Import Error

I exported a VM from an ESXi host yesterday and I tried to import it to a cluster but I got the following error: "OVF Deployment Failed: File ds:///vmfs/volumes/ uuid /_deviceImage-0.iso was not found" This happened because I had connected an .iso file to the CD/DVD device and that file was not available on the destination host. To overcome this issue you may edit the .ovf file created by the export process and replace the "vmware.cdrom.iso" to "vmware.cdrom.remotepassthrough" option. The tricky part now, when you edit the file, the checksum of the file is changed so you have to update it on the .mf file created also be the export process. Get the file's SHA1 checksum using your favourite tool and set it in the .mf file. Then, you're good to go, you should be able to import the VM without any problems. As a final note, I would suggest you made backup copies of the two files above in order to avoid exporting the VM again. Documented o...