This file contains hidden or 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
$tenantsource = Connect-Site -Url "https://contoso-admin.sharepoint.com" -Browser | |
$tenantdest = Connect-Site -Url "https://tailspin-admin.sharepoint.com" -Browser | |
$UPNDomainSource = "contoso.onmicrosoft.com" | |
$UPNDomainDestination = "tailspin.onmicrosoft.com" | |
#List of users in the old tenant that are to be migrated. Header in CSV is UPN. | |
$users = import-csv 'C:\temp\UPN.csv' | |
$filepath = "C:\temp\CopyContentOneDrive.csv" |
This file contains hidden or 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
$Sites = import-csv c:\temp\CopyContentOneDrive.csv -Delimiter "," | |
$tenantsource = Connect-Site -Url "https://contoso-admin.sharepoint.com" -Browser | |
foreach($site in $Sites){ | |
Add-SiteCollectionAdministrator -SiteUrl $site.SourceSite -CentralAdmin $tenantsource | |
This file contains hidden or 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
Import-Module Sharegate | |
$csvFile = "C:\temp\CopyContentOneDrive.csv" | |
$table = Import-Csv $csvFile -Delimiter "," | |
$tenantsource = Connect-Site -Url "https://contoso-admin.sharepoint.com" -Browser | |
$tenantdest = Connect-Site -Url "https://tailspin-admin.sharepoint.com" -Browser | |
$copysettings = New-CopySettings -OnContentItemExists IncrementalUpdate | |
Set-Variable srcSite, dstSite, srcList, dstList |
This file contains hidden or 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
$source = Connect-Tenant -Domain contoso.onmicrosoft.com -Browser | |
$destination = Connect-Tenant -Domain tailspin.onmicrosoft.com -Browser | |
#Enter the date from when the sesion you want to run incremental on is from. | |
$sessions = Find-CopySessions -From "11/25/2022" | |
$sessions | ForEach-Object { Copy-TeamIncremental -SessionId $_.Id -SourceTenant $source -DestinationTenant $destination } |
This file contains hidden or 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
#Authentication | |
$consumerToken = "Enter your consumer token here" | |
$employeeToken = "enter your employee token here" | |
#Expiration date of the authorization toke you generate is set to 1 day from now. | |
$expirationDate = get-date ((get-date).Adddays(+1)) -format "yyyy-MM-dd" | |
$uri = "https://tripletex.no/v2/token/session/:create?consumerToken=$consumerToken&employeeToken=$employeeToken&expirationDate=$expirationDate" | |
#Get token and create header. | |
$token = ((Invoke-RestMethod -Method PUT -Uri $uri -ContentType "application/JSON").value).token | |
$user = '0' |
This file contains hidden or 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
$ProjectsURL = "https://tripletex.no/v2/project?from=0" | |
$Projects = (Invoke-RestMethod -Method Get -uri $ProjectsURL -Headers $Header).values |
This file contains hidden or 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
$TenantId = "xxxxxxxx" | |
$ClientID = "xxxxxxxxx" | |
$ClientSecret = "xxxxxxx" | |
function Get-MSGraphAppToken{ | |
<# .SYNOPSIS | |
Get an app based authentication token required for interacting with Microsoft Graph API | |
.PARAMETER TenantID | |
A tenant ID should be provided. | |
.PARAMETER ClientID |
This file contains hidden or 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
{ | |
"type": "object", | |
"properties": { | |
"ProjectID": { | |
"type": "string" | |
}, | |
"EmployeeName": { | |
"type": "string" | |
}, | |
"EmployeeID": { |
This file contains hidden or 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
{ | |
"type": "object", | |
"properties": { | |
"TimesheetEntryID": { | |
"type": "string" | |
} | |
} | |
} |