Octopus allows PowerShell scripts to be executed during a deployment. PowerShell is incredibly powerful and makes a great tool for deployment automation, so it's a feature we rely on heavily.
To invoke PowerShell scripts, we currently use the Runspace classes to host PowerShell inside the Octopus Tentacle process. We read the PowerShell script from a file into a string and execute it, as if you were typing it into a PowerShell console.