PowerShell: Difference between revisions
Jump to navigation
Jump to search
Line 57: | Line 57: | ||
* [https://www.hurryupandwait.io/blog/fixing-winrm-firewall-exception-rule-not-working-when-internet-connection-type-is-set-to-public WinRM <code>Firewall Exception Hacks</code> for Public Network] | * [https://www.hurryupandwait.io/blog/fixing-winrm-firewall-exception-rule-not-working-when-internet-connection-type-is-set-to-public WinRM <code>Firewall Exception Hacks</code> for Public Network] | ||
* [https://www.hanselman.com/blog/installing-powershell-core-on-a-raspberry-pi-powered-by-net-core Installing PowerShell Core on a Raspberry Pi] | * [https://www.hanselman.com/blog/installing-powershell-core-on-a-raspberry-pi-powered-by-net-core Installing PowerShell Core on a Raspberry Pi] | ||
* [https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse Installing OpenSSH with PowerShell] | |||
* [https://geektechstuff.com/2019/09/25/installing-powershell-core-on-raspbian-rasbperry-pi/ Installing PowerShell Core on Pi OS] | * [https://geektechstuff.com/2019/09/25/installing-powershell-core-on-raspbian-rasbperry-pi/ Installing PowerShell Core on Pi OS] | ||
* [https://github.com/PowerShell/PowerShell/releases GitHub Release of PowerShell] | * [https://github.com/PowerShell/PowerShell/releases GitHub Release of PowerShell] | ||
* [https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#installation---raspbian Raspberry Pi Installation] | * [https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#installation---raspbian Raspberry Pi Installation] | ||
|} | |} |
Revision as of 18:04, 21 November 2020
Get-Service WinRM
Restart-Service WinRM
Enable-PSRemoting -Force
Set-Item WSMan:\localhost\Client\TrustedHosts *
WinRM s winrm/config/client '@{TrustedHosts="10.19.83.10,10.19.83.14"}'
WinRM quickconfig
Test-WsMan 10.19.83.10
Invoke-Command -ComputerName 10.19.83.10 -ScriptBlock { Get-ChildItem C:\ } -Credential academia
Enter-PSSession -ComputerName 10.19.83.10 -Credential academia
Knowledge
Get-Service WinRM
Restart-Service WinRM
Enable-PSRemoting -Force
Get-Item WSMan:\localhost\Client\TrustedHosts
Set-Item WSMan:\localhost\Client\TrustedHosts *
Set-Item WSMan:\localhost\Client\TrustedHosts -Force -Value 10.19.83.10
$s = New-PSSession -ComputerName "10.19.83.10" -Credential(Get-Credential)
Invoke-Command -Session $s -ScriptBlock { Get-ChildItem C:\ }
Invoke-Command -Session $s -ScriptBlock { Get-Service }
Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex 10 -NetworkCategory Private
Set-WSManQuickConfig
Enable-PSRemoting -SkipNetworkProfileCheck
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
brew cask install powershell
brew upgrade powershell --cask
brew tap homebrew/cask-versions