Setting Up Your Computer
Homework time: set up your own workstation, whatever one you do your day-to-day work on, since you'll be using PowerShell during your regular work.
You do NOT have to install any SQL Agent jobs or artifacts yet - just the stuff below.
Windows folks, install:
- Visual Studio Code, and then the PowerShell extension
- SQL Server Developer Edition
- SQL Server Management Studio
After installation, make a folder called C:\JunkFiles and run the Generate-JunkFiles.ps1 - it's in the download, and it's also below. It will run for a default of 2 minutes and generate a lot of very small files in the C:\JunkFiles\ folder, one file each 2 seconds that the job runs. You can also stop it at any time.
If you're following along on Mac or Linux, a few things will be slightly different:
- Install PowerShell. This isn't built into your Mac or Linux workstation.
- On Macs with Apple Silicon (M1/M2/etc) processors, install SQL Server in a Docker container.
- Instead of SQL Server Management Studio, install Azure Data Studio.
And Mac and Linux users will need to edit this line of Generate-JunkFiles:
$FileContent | Out-File -FilePath "C:\JunkFiles\$FileName"
And change it to a different path based on your own workstation - wherever you want to put the working files, like in a folder in your home folder. For example, I've created a /JunkFiles folder in the Downloads folder of my home directory:
$FileContent | Out-File -FilePath "Downloads/JunkFiles/$FileName"