Chocolatey: Difference between revisions

From Omnia
Jump to navigation Jump to search
Line 88: Line 88:
choco install -y winmerge
choco install -y winmerge
choco install -y openssh
choco install -y openssh
choco install -y grep
</pre>
</pre>


All:
All:
  choco install -y putty kitty notepadplusplus cygwin 7zip openhashtab filezilla irfanview irfanviewplugins winmerge rsync openssh
  choco install -y putty kitty notepadplusplus cygwin 7zip openhashtab filezilla irfanview irfanviewplugins winmerge rsync openssh grep


=== putty ===
=== putty ===
Line 113: Line 114:
=== rsync ===
=== rsync ===
  choco install -y rsync
  choco install -y rsync
=== grep ===
choco install -y grep
=== openssh ===
=== openssh ===
  choco install -y openssh
  choco install -y openssh

Revision as of 22:59, 7 June 2024

Install Chocolatey

Install with PowerShell...

Note: With PowerShell, you must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.

Run:

Get-ExecutionPolicy.

If it returns Restricted, then run:

Set-ExecutionPolicy AllSigned
# or
Set-ExecutionPolicy Bypass -Scope Process

Then run:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

ref: https://chocolatey.org/install

---

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

Ref: http://www.hanselman.com/blog/IsTheWindowsUserReadyForAptget.aspx

Install Package

choco install [PACKAGE]
# or
cinst [PACKAGE]

List Intalled

choco list

Remove Package

choco uninstall [PACKAGE]

Upgrade Package

chocolatey upgrade [PACKAGE]
# OR (warning shim is being removed)
cup [PACKAGE]

Upgrade All Packages

choco upgrade all
choco upgrade all -y
# OR (warning this shim is being removed)
cup all

ref: [1]

Package List Online

https://community.chocolatey.org/packages

Install Custom Package From Source Path

choco install [PACKAGE] --source //smb.oeey.com/chocolatey/packages

Clear Cache

%temp%\Chocolatey
%temp%\

Logs

C:\ProgramData\chocolatey\logs

Favorite Packages

choco install -y putty
choco install -y kitty
choco install -y notepadplusplus
choco install -y cygwin
choco install -y 7zip
choco install -y openhashtab
choco install -y filezilla
choco install -y irfanview irfanviewplugins
choco install -y winmerge
choco install -y openssh
choco install -y grep

All:

choco install -y putty kitty notepadplusplus cygwin 7zip openhashtab filezilla irfanview irfanviewplugins winmerge rsync openssh grep

putty

choco install -y putty

kitty

choco install -y kitty

notepadplusplus

choco install -y notepadplusplus

cygwin

choco install -y cygwin

7zip

choco install -y 7zip

openhashtab

choco install -y openhashtab

filezilla

choco install -y filezilla

Irfanview

choco install -y irfanview irfanviewplugins

winmerge

choco install -y winmerge

rsync

choco install -y rsync

grep

choco install -y grep

openssh

choco install -y openssh
Installing OpenSSH on Windows 10
https://dejulia489.github.io/2017-05-07-InstallingOpenSSHOnWindows10/

Installs to:

C:\ProgramData\chocolatey\lib\openssh

Install opensshd

"C:\Program Files\OpenSSH-Win64\install-sshd.ps1"

Generate host private keys:

 "C:\Program Files\OpenSSH-Win64\ssh-keygen.exe" -A

Access to those hosts private keys

   Get-ChildItem -Path 'C:\Program Files\OpenSSH\ssh_host_*_key' | % {    
	   $acl = get-acl $_.FullName
	   $ar = New-Object  System.Security.AccessControl.FileSystemAccessRule("NT Service\sshd", "Read", "Allow")
	   $acl.SetAccessRule($ar)
	   Set-Acl $_.FullName $acl
	}

Firewall:

New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH

Auto start service after reboot:

Set-Service SSHD -StartupType Automatic
Set-Service SSH-Agent -StartupType Automatic

Modify the Password Authentication and add the Powershell Subsystem

$FilePath = "C:\Program Files\OpenSSH-Win64\sshd_config"
$FileData = (Get-Content $FilePath).Replace('#PasswordAuthentication yes','PasswordAuthentication yes') 
$FileData += 'Subsystem	powershell C:\Program Files\PowerShell\6.0.0-alpha.18\powershell.exe -sshs -NoLogo -NoProfile' 
$FileData | Out-File $FilePath -Force

Restart service:

Restart-Service sshd

Remote to Linux server:

Enter-PSSession -HostName $LinuxServerIP -UserName administrator

More Packages

greenshot

choco install greenshot

firefox

choco install firefox

googlechrome

choco install googlechrome

vlc

choco install -y vlc

adobereader

choco install adobereader

wsl

choco install -y wsl 
choco install wsl-ubuntu-1804

postman

choco install -y postman

vscode

choco install -y vscode

slack

choco install -y slack

git

choco install git

gimp

choco install gimp

ccleaner

choco install ccleaner

winscp

choco install winscp

64bit Python 3

Install:

choco install -y python3

Ref: https://chocolatey.org/packages/python3

Deprecated Packages

32bit Python 2.7

Install:

choco install -y python2-x86_32
choco install -y python2-x86_32 pip

Ref: https://chocolatey.org/packages/python2-x86_32

64bit Python 2.7

Install:

choco install -y python2

Ref: https://chocolatey.org/packages/python2

Keywords