computers:powershell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
computers:powershell [2019/03/17 03:53] – created localadmincomputers:powershell [2021/11/26 16:36] (current) – [Using vim as your editor in the command line] localadmin
Line 1: Line 1:
 +====== Powershell Tips, and examples ======
 +
 +===== Enabling, and using SSH with Powershell =====
 +
 +https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
 +
 +One quirk with using OpenSSH Server via Windows is that the authorized_keys file is used only for standard users. If the user you are trying to connect with is an admin, you have to use the administrator_authorized_keys file in ProgramData/ssh/ - https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration
 +
 +===== Using vim as your editor in the command line =====
 +
 +https://codeandkeep.com/PowerShell-And-Vim/
 +
 +Install the windows vim application
 +Create a powershell profile - https://www.howtogeek.com/50236/customizing-your-powershell-profile/ (note you may have an issue with creating a profile, Powershell may complain about restricting the use of running scripts. See here - thewindowsclub.com/powershell-file-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system)
 +Add these alias lines inside the profile:
 +<code>
 +New-Alias -Name vim -Value 'C:\Program Files (x86)\Vim\vim82\vim.exe'
 +New-Alias -Name vi -Value 'C:\Program Files (x86)\Vim\vim82\vim.exe'
 +</code>
 +
 +More on profile locations - https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.2
 +
 +Restart your session for the changes to take effect.
 +
 ===== Making Powershell look pretty ===== ===== Making Powershell look pretty =====
  
  • computers/powershell.1552794805.txt.gz
  • Last modified: 2019/03/17 03:53
  • by localadmin