Category Archives: Uncategorized

Upload Files to SharePoint Online

Special thanks to Shane Young https://www.youtube.com/channel/UC7_OGRP8BYvtGB8eZdPG6Ng

Powershell admin credentials

install-Module -Name SharePointPnPPowerShellOnline

Assign file to a variable:

$Variable = get-ChildItem location\file.ext

Add-PnpFile -Path $cow -Folder "Document Library Use Quotes" -Values @{Modified=VARIABLE.LastWriteTimeUtc;Created=VARIABLE.CreationTimeUtc}

Get-ChildItem '\server\share'
ForEach-Object {
Add-PnpFile -Path $_.FullName -Folder "Shared Documents" -Values @{Modified=$_.LastWriteTimeUtc;Created=$_.CreationTimeUtc}
}

...

Hard Matching on Prem users with Azure AD Users

When implementing Azure AD Sync in an existing Office 365 tenant with populated users it is sometimes necessary to hard match users to ensure that On-Prem users are not created as new users in Office 365.

Typically I will install AD Sync and try soft matching first (where email address and upn name are matched. If duplicates get created, pause AD-Sync, Delete the newly created users from Office 365. Purge them from the recycle bin:

Connect-MsolService
Get-MsolUser -ReturnDeletedUsers
Remove-MsolUser -UserPrincipalName EMAILADDRESSHERE -RemoveFromRecycleBin

Once the user(s) have been deleted you can match them by their immutableID. Run this in PowerShell on the Domain Controller.

$credential = Get-Credential
Connect-MsolService -Credential $credential
$ADUser = "username" 
$365User = "username@emaildomainname.com"
$guid =(Get-ADUser $ADUser).Objectguid
$immutableID=[system.convert]::ToBase64String($guid.tobytearray())
Set-MsolUser -UserPrincipalName... 						
						

We Do House Calls!

Are you tired of packing up your computer to take it to a large box store for repairs? Are you frustrated with how long they need to fix it? Give us a call. We will come to your office, house, barn, trailer, or truck we don't mind....