Skip to content

Commit c652033

Browse files
committedOct 16, 2022
📝 Chocolatey
1 parent 75aeac8 commit c652033

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed
 

‎DefaultPowershellCommands.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ _This returns specific account permissions in an easy-to-read format._
169169

170170
- **3**:
171171

172-
This option is the default for a user. This option prompts the Consent Admin to enter his or her username and password (or that of another valid admin) when
172+
This option is the default for a user. This option prompts the Consent Admin to enter his or her username and
173+
password (or that of another valid admin) when
173174
an operation requires elevation of privilege.
174175

175176
- **4**:
@@ -181,7 +182,8 @@ _This returns specific account permissions in an easy-to-read format._
181182

182183
- **5**:
183184

184-
This option is the default for an admin. It is used to prompt the administrator in Admin Approval Mode to select either "Permit"
185+
This option is the default for an admin. It is used to prompt the administrator in Admin Approval Mode to select
186+
either "Permit"
185187
or "Deny" for an operation that requires elevation of privilege for any non-Windows binaries. If the Consent Admin
186188
selects Permit, the operation will continue with the highest available privilege. This operation will happen on the
187189
secure desktop.
@@ -191,3 +193,37 @@ _It is a good practice to set the consent behavior for an admin to 1._
191193
## Add Windows Defender Exemption
192194

193195
> Add-MpPreference -ExclusionPath "C:\Users\your user here\AppData\Local\Temp\chocolatey\"
196+
197+
## Change Execution Policy for Process Scope
198+
199+
> Get-ExecutionPolicy -List
200+
201+
> Set-ExecutionPolicy Unrestricted -Scope Process
202+
203+
## Install Chocolatey
204+
205+
> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol
206+
> = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient)
207+
> .DownloadString('https://chocolatey.org/install.ps1'))
208+
209+
## Install Tools /w Chocolatey
210+
211+
> choco install python vscode git wsl2 openssh openvpn microsoft-windows-terminal
212+
213+
## Choco Build Script
214+
215+
```powershell
216+
# Choco build script
217+
218+
write-host "*** Initial app install for core tools and packages. ***"
219+
220+
write-host "*** Configuring chocolatey ***"
221+
choco feature enable -n allowGlobalConfirmation
222+
223+
write-host "*** Beginning install, go grab a coffee. ***"
224+
choco upgrade wsl2 python git vscode openssh openvpn netcat nmap wireshark \
225+
burp-suite-free-edition heidisql sysinternals putty golang neo4j-community openjdk
226+
227+
write-host "*** Build complete, restoring GlobalConfirmation policy. ***"
228+
choco feature disable -n allowGlobalCOnfirmation
229+
```

‎Windows.md

+4
Original file line numberDiff line numberDiff line change
@@ -446,3 +446,7 @@ Some examples:
446446
447447
> Add-MpPreference -ExclusionPath "C:\Users\your user here\Documents\scripts\
448448
449+
### Chocolatey
450+
451+
[Chocolatey](https://chocolatey.org/install) is software management automation for Windows that wraps installers,
452+
executables, zips, and scripts into compiled packages.

0 commit comments

Comments
 (0)
Please sign in to comment.