Sometimes, for several reasons, you’ll have to import calendar events into users mailbox in O365.
That could be done using different methods, directly using a service account (with a mailbox !), impersonated (as if the user created the event).
Here below is a quick example of a small script (powershell of course ! )
PowerShell Conference Europe is the largest PowerShell-themed conference in Europe, and is held in Hanover, Germany each year. We attract speakers and attendees from all over the world, with such topics as security, DevOps, databases, core language features, optimization, DSC, best practices and much more.
Here are some sites and references if you want to learn or train in Powershell
Microsoft Virtual Academy
Microsoft Virtual Academy (MVA) is a logical first-stop when searching for sources of free learning. A search for “powershell” on the main page of the MVA website returns 68 hits, 13 of which include PowerShell in the course title.Read more
For those who are starting to work on O365 using powershell, here below are some short lines to help you.
Connect to O365 :
$cred=get-credential -Message "Please provide an O365 admin account"
connect-msolservice -credential $cred
$O365Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $O365Session -AllowClobber
Add a licence to a user :
$Options = New-MsolLicenseOptions –AccountSkuId "YOURTENANT:ENTERPRISEPACK"
Set-MsolUserLicense –UserPrincipalName $upn –LicenseOptions $Options -ErrorVariable:errv
Hey there !
A little tip I’ve just found, really usefull.
If you need to open a file through Powershell with the default application set up in Windows parameter, just use “Start-process” and the full path of your file
In this short example, this command will launch Excel and your file !Read more