SQL Persistence

Configure PowerShell Universal to use Microsoft SQL Server.

Download this Lecture Docs

In this lecture, we look at how to setup PowerShell Universal to use Microsoft SQL Server for persistence. By default, PowerShell Universal will use a single-file database called LiteDB. This video walks through the MSI installer and then talks about the generated appsettings.json file that controls the SQL connection.

Example code from this lecture

{
  "Kestrel": {
    "Endpoints": {
      "HTTP": {
        "Url": "http://*:5000"
      }
    }
  },
  "Plugins": [
    "SQL"
  ],
  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=PSU;Trusted_Connection=True;"
  }
}