The problem is the quotes you used when you were dot-sourcing the .ps1 file.
That should be (without the quotes)
. .\Get-STSCerts.ps1
With the quotes, you are just showing a string on the console.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference