Kretschmer
Contributor
Contributor

Move Datastore to a Folder

Jump to solution

Hi there,

I am searching for a workflow which moves a datastore to a datastore folder. Couldn´t find it in the library, even google didn´t find any.

Appreciate any help

Christian

0 Kudos
1 Solution

Accepted Solutions
filosmith
Enthusiast
Enthusiast

I don't know if there's a canned workflow, but you can create your own.

Create an array with the datastore(s) you want to move.

Get the object for the folder you want to move them to.

Then do folder.moveIntoFolder_Task(arrayOfDatastores);

View solution in original post

0 Kudos
2 Replies
Marmotte94
Enthusiast
Enthusiast

Hi,

Can you use PowerCLI on your workflow ?

If you can use PowerCLI, you can use this Script :

$MydataFolder = get-folder -Type Datastore -Name Folder

$Datastore = Get-Datastore -Name datastoreName

Move-Datastore $Datastore -Destination $MydataFolder

Thank you.

Olivier.

Please, visit my blog http://www.purplescreen.eu/
0 Kudos
filosmith
Enthusiast
Enthusiast

I don't know if there's a canned workflow, but you can create your own.

Create an array with the datastore(s) you want to move.

Get the object for the folder you want to move them to.

Then do folder.moveIntoFolder_Task(arrayOfDatastores);

View solution in original post

0 Kudos