follow us On Twitter Follow us on Facebook Gladinet Cloud Storage Blog Support forum

Thursday, February 12, 2015

Use PowerShell to Manage User and User’s Home Directory

Gladinet Cloud Enterprise is a private file sync and share solution for enterprise.  As an administrator for the Gladinet Cloud Enterprise solution, you may be responsible for setting up home directories for users in the solution.

PowerShell is very convenient for this kind of task. Today’s example is using PowerShell to setup a home directory version folder after the user has been created.

For demonstration purpose, we will use the PowerShell ISE. Since the ISE has the help panel, it is very easy to see each PowerShell commands.

In this example, The GCE server is at, the administrator is joe@gladinet.com and the password is dddddddd.

PowerShell ISE



PS D:\> Import-Module .\GCEAutomation.dll

PS D:\> $login = Get-GceLogin joe@gladinet.com dddddddd

PS D:\> $login

Cookie                 : b5T0TszRmZ7Qdq2CkrKtqEJpdFgfqBgMd/GelzWuhTmAd16JSO6b34IUiCQ3AXwdNqq2byXjFUjKp0KIGxK1a43WDZqrJj/aM2GZnjxtOp
NSEndPoint             :
LSEndPoint             : http://localhost:8080/localstor/n.svc/
RelayServer            :
Hours                  : 4
User                   : user.SingleUser
PortalServer           :
BrandingProductName    : Gladinet Cloud
KeepCmdChannel         : False
SupportSetLastModified : True
WCVersion              :
ForceVersioned         : False
Success                : True
Reason                 :
Context                :
Context1               :


Acquire a User Guid

The administrator can create version folder for an end user. In this example, we just use the User Guid for the administrator himself.  You can also get the user’s guid some other ways. For example, the user’s guid is returned when you just create the user.

PS D:\> $login.User.UserGuid




PS D:\> $result = Add-GceVersionFolderForUser -FolderName "joe-home-folder" -UserGuid $login.User.UserGuid -LoginToken $login.Cookie -ServerUrl

PS D:\> $result

                                Success Reason                                  Context                                 Context1                              
                                ------- ------                                  -------                                 --------                              


Verify The Folder is Created



For more information, visit http://www.gladinet.com

No comments: