Created
January 22, 2020 22:02
-
-
Save jakerobinson/6a1ef0fb193c1eb2727a354959401d18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-VsanDirectory { | |
param ( | |
$datastore, | |
$name | |
) | |
$serviceInstance = Get-View ServiceInstance | |
$datastoreNamespaceMgr = Get-View $serviceInstance.Content.DatastoreNamespaceManager | |
$folderPath = $datastoreNamespaceMgr.createDirectory($datastore.ExtensionData.moref,$name,"") | |
$folderPath.split("/")[-1] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment