Menu

#1 New-DatAnywhereWorkspace & New-DatAnywhereWorkspaceFolder

1.0
closed
Workspace (1)
2016-01-19
2016-01-18
Matt Smith
No

Hi David,

First I want to thank you for putting this together, my organization is getting ready to do a major rollout of DatAnywhere and being able to automate root and workspace creation is a massive help. I was hoping you could help me out a bit more, though. I've had success using your script to create new roots, but I cannot for the life of me create Workspaces. I feel like I'm following your examples correctly, and the cmdlets don't return any errors, but my Workspaces are not being created. Could you provide a little more information as to how I should be using the New-DatAnywhereWorkspace and New-DatAnywhereWorkspaceFolder cmdlets?

Cheers,
Matt

Discussion

  • David Vekemans

    David Vekemans - 2016-01-18

    Hi Matt,
    Thanks a lot for your interest in my script.
    I just uploaded the version 2.00, which I recommend. This version doesn't use anymore the CLI but directly the web API's of DatAnywhere. Performance are much improved (10x faster).

    To answer you question regarding the creation of a workspace.
    in version 1.03
    You need first to have a Root object :
    $Root = Get-DatAnywhereRoot "\server\share"

    Then you need to create what I called a "Workspace Folder Object". In fact you need this because when adding folders in a workspace you need the path of the folder and the root ID.
    Using this command does nothing on DatAnywhere, it just create a powershell object with all the needed information.
    So let's create one:
    $WksFolders = $Root | New-DatAnywhereWorkspaceFolder -FolderName "Name as seen in the worksapce" -PathFromRoot "folder"

    When this object exist, you can create the workspace:
    New-DatAnywhereWorkspace -WorkspaceFolder $WksFolders -TargetUserAccount domain\username -WorkspaceName "Workspace Name"

    in version 2.00
    The way to handle it is a little bit different in version 2.00:

    Get the root object:
    $Root = Get-DatAnywhereRoot -UNCPath "\server\share"

    Create the empty workspace:
    $objWorkspace=Add-DatAnywherePrivateWorkspace -Name "Workspace Name" -TargetUserAccount "domain\username"

    Create the Workspace Folder object(s) that you want to add in the workspace:
    $WksFolders = $Root | New-DatAnywhereWorkspaceFolder -Name "Name" -PathFromRoot folder

    Finaly, add the Workspace Folder into the Workspace:
    Set-DatAnywhereFolderInPrivateWorkspace -Workspace $objWorkspace -WorkspaceFolder $WksFolders

    Note that in this case, you can not add or remove folder from a workspace (there is no add or remove command). But each time you need to do a "set" with the list of folders you want to configure in the folder.

    Don't hesitate to post you code if you want. So I can have a look.

     
  • Matt Smith

    Matt Smith - 2016-01-19

    This is exactly what I needed! Sorry for the delayed reponse; I was busy putting my script together. I am completely good to go. Thank you again for your time and help!

    Cheers,
    Matt

     
  • David Vekemans

    David Vekemans - 2016-01-19

    I'm happy to read that my answer helped you !

    I close the ticket.

     
  • David Vekemans

    David Vekemans - 2016-01-19
    • labels: --> Workspace
    • status: open --> closed
    • assigned_to: David Vekemans
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.