This message was deleted.
# _general
s
This message was deleted.
j
Out of curiosity (I used to be the first ShareFile Sales Engineer back in 2012), and putting cost aside, but why would you have to write your own Connector?
l
Awe, we worked with Alex before he was transferred and let us know with sharefile we could write a connector that would do the same thing as Kumo. https://uits.iu.edu/kumo
j
I've been out of the loop for a while and my former team doesn't seem to be on here 😬 But if your backend platform is something different than ShareFile cloud storage, their on-premises StorageZones or existing fileshares, then yes, a custom connector would be the solution. But if you use any of the native StorageZone types there's various options from a client perspective, sync or drivemapper. But maybe I'm not seeing the full picture here. Cost could be a barrier, especially with cloud storage. In "my days" we would make things happen, but those days might be gone 😬
l
LOL, Kumo is only 16 grand for the entire university with different portals for every department at no extra cost. But, because somehow it's not made by a fortune 500 company it is not an enterprise class app. Go figure. So they might be willing to give their first, second, and third born for sharefile since this is possible. Lol
🤦🏻 1
m
you can do this but you’re going to be prompted for creds every time onedrive opens
there is a script I can share that forces a sync at login
you can also use known folder move with files on demand but it may have issues with the fact you can’t use SSO due to the different domain and no trust
that will auto migrate existing files in the documents and desktops folders up to onedrive, but you’d need to direct them back to the profile first if they are currently redirected
it’s probably doable, it’ll probably be annoying to have to log into onedrive on login every time, but I suppose that all depends on how long you leave your session open. 1x a week vs 3x a day…
l
Hey Mike, Long time. Ya, I would like to see it. This may work for our own department, and I’ll figure out how to survive that black hole for the general population. I may be able to the sso. We have a one way transitive trust with them. Our own department will work since we have our own users. The session I cut people of every 24 hours for staff, and 4 hours for the general population. Who cares about them. 🙂 I’ll pm you later on about the situation that happened here and with Entisys. I cannot speak with sales directly, but I can play telephone with other people.
do you still have my email to send the script, or I could create a box folder to put it in.
m
I just went through it and the script I have just auto syncs a sharepoint site, so if you aren’t moving all files to sharepoint it might not help you.
known folder move is what you want though, hav a look into that
l
Ok cool. I would like to still see it. It will help explain to management what the issue truly are.
m
Copy code
Start-Sleep -Seconds 100
#region Functions
function Sync-SharepointLocation {
    param (
        [guid]$siteId,
        [guid]$webId,
        [guid]$listId,
        [mailaddress]$userEmail,
        [string]$webUrl,
        [string]$webTitle,
        [string]$listTitle,
        [string]$syncPath
        
    )
    try {
        Add-Type -AssemblyName System.Web
        #Encode site, web, list, url & email
        [string]$siteId = [System.Web.HttpUtility]::UrlEncode($siteId)
        [string]$webId = [System.Web.HttpUtility]::UrlEncode($webId)
        [string]$listId = [System.Web.HttpUtility]::UrlEncode($listId)
        [string]$userEmail = [System.Web.HttpUtility]::UrlEncode($userEmail)
        [string]$webUrl = [System.Web.HttpUtility]::UrlEncode($webUrl)
        #build the URI
        $uri = New-Object System.UriBuilder
        $uri.Scheme = "odopen"
        $uri.Host = "sync"
        $uri.Query = "siteId=$siteId&webId=$webId&listId=$listId&userEmail=$userEmail&webUrl=$webUrl&listTitle=$listTitle&webTitle=$webTitle"
        #&folderName=$folderName
        #launch the process from URI
        Write-Host $uri.ToString()
        start-process -filepath $($uri.ToString())
    }
    catch {
        $errorMsg = $_.Exception.Message
    }
    if ($errorMsg) {
        Write-Warning "Sync failed."
        Write-Warning $errorMsg
    }
    else {
        Write-Host "Sync completed."
        while (!(Get-ChildItem -Path $syncPath -ErrorAction SilentlyContinue)) {
            Start-Sleep -Seconds 2
        }
        return $true
    }    
}
#endregion
#region Main Process
try {
    #region Sharepoint Sync
    [mailaddress]$userUpn = cmd /c "whoami/upn"
    $params = @{
        #replace with data captured from your sharepoint site.
        siteId    = "{}"
        webId     = "{}"
        listId    = "{}"
        userEmail = $userUpn
        webUrl    = "https://yourcompany.sharepoint.com/sites/yourdepartment"
        webTitle  = "yourcompany"
        listTitle = "Documents"
        
    }
    $params.syncPath  = "$(split-path $env:onedrive)\$("yourcompany")\$($params.webTitle) - $($params.listTitle)"
    Write-Host "SharePoint params:"
    $params | Format-Table
    if (!(Test-Path $($params.syncPath))) {
        Write-Host "Sharepoint folder not found locally, will now sync.." -ForegroundColor Yellow
        $sp = Sync-SharepointLocation @params
        if (!($sp)) {
            Throw "Sharepoint sync failed."
        }
    }
    else {
        Write-Host "Location already syncronized: $($params.syncPath)" -ForegroundColor Yellow
    }
    #endregion
}
catch {
    $errorMsg = $_.Exception.Message
}
finally {
    if ($errorMsg) {
        Write-Warning $errorMsg
        Throw $errorMsg
    }
    else {
        Write-Host "Completed successfully.."
    }
}
#endregion
l
Awesome! Thank you.
m
it basically builds you the link that you ’d get from clicking sync in sharepoint or temas
then opens it
and that link auto opens in onedrive, that kicks off the sync
if you try to do it via GPO you will wait FOREVER, up to 8 hours, it’s so silly
so we have this as a login script
if it’s already syncing then it doesn’t try again
l
This is really cool. Thank you.
m
you may need to tweak the UPN part because your accounts are in another domain, I’ll leave that to you