O'Reilly logo

PowerShell for Office 365 by Prashant G Bhoyar, Martin Machado

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scheduled execution

Before we begin the setup, let's review the requirements to complete our scenario:

  • Execution needs to happen without a user session
  • The account's minimum privileges include access to a local database
  • The account's password should not expire
  • Script results need to be available for review in the event of an error

So that we do not use password credentials in clear text (for the database connection), we will use a domain account to run the script. When creating the account, make sure you check the Password never expires setting:

In SQL Server, we give the account Select access only to the tables we are using. A better approach ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required