On Ubuntu the public key is stored in the user's home folder ~/.ssh in the authorized_keys file. You don't need the SSHTransport parameter if you use the HostName parameter because this already implies that it is an SSH connection.
Very helpful article. I managed to get PowerShell working with SSH with password authentication and Ubuntu as remote machine with no problem but not with Public Key Authentication. Where do I have to store the public key on Ubuntu? And why are the SSHTransport and Subsystem parameter not necessary?
Great article! Quick question, "How do I tab over the last @ in the here-string?" Without this ability to tab over, it breaks PowerShell ISE and Visual Studio Code's PowerShell extension. In other words, the expand and collapse functionality of code blocks is broken, because those IDE's don't know how to handle the '@ starting at any other location than the beginning of a line.
Finding nested groups in large Active Directory groups can be a challenging task. Active Directory includes the cmdlet Get-ADGroupMember for finding group members, but it cannot be used to query groups with over 5000 members. The cmdlet also suffers from performance bottlenecks. I'd like to share with you a tool I built that solves both those problems.