https://github.com/ethanbergstrom/Foil
A PowerShell Crescendo wrapper for Chocolatey
https://github.com/ethanbergstrom/Foil
Last synced: 3 months ago
JSON representation
A PowerShell Crescendo wrapper for Chocolatey
- Host: GitHub
- URL: https://github.com/ethanbergstrom/Foil
- Owner: ethanbergstrom
- License: mit
- Created: 2021-03-20T21:28:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T20:49:19.000Z (about 1 year ago)
- Last Synced: 2024-05-23T00:32:25.091Z (9 months ago)
- Language: PowerShell
- Size: 62.5 KB
- Stars: 20
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
- jimsghstars - ethanbergstrom/Foil - A PowerShell Crescendo wrapper for Chocolatey (PowerShell)
README
[](https://github.com/ethanbergstrom/Foil/actions/workflows/CI.yml)
# Foil
Foil is a PowerShell Crescendo wrapper for Chocolatey## Install Foil
```PowerShell
Install-Module Foil -Force
```## Sample usages
### Search for a package
```PowerShell
Find-ChocoPackage -Name nodejsFind-ChocoPackage -Name firefox -Exact
```### Install a package
```PowerShell
Find-ChocoPackage nodejs -Exact -Verbose | Install-ChocoPackageInstall-ChocoPackage -Name 7zip -Verbose
```
### Get list of installed packages
```PowerShell
Get-ChocoPackage nodejs -LocalOnly -Verbose
```
### Uninstall a package
```PowerShell
Get-ChocoPackage keepass-plugin-winhello -LocalOnly -Verbose | Uninstall-ChocoPackage -Verbose -RemoveDependencies
```### Manage package sources
```PowerShell
Register-ChocoSource privateRepo -Location 'https://somewhere/out/there/api/v2/'
Get-ChocoPackage nodejs -Verbose -Source privateRepo -Exact | Install-ChocoPackage
Unregister-ChocoSource privateRepo
```Foil integrates with Choco.exe to manage and store source information
## Pass in package parameters
The Install-ChocoPackage cmdlet allows passing package parameters.```powershell
Install-ChocoPackage sysinternals -AcceptLicense -ParamsGlobal -Params '/InstallDir:c:\windows\temp\sysinternals /QuickLaunchShortcut:false' -Verbose
```## Known Issues
### Compatibility
Foil works with PowerShell for both FullCLR/'Desktop' (ex 5.1) and CoreCLR (ex: 7.0.1), though Chocolatey itself still requires FullCLR.The `-LocalOnly` switch for `Get-ChocoPackage` becomes deprecated when used with Chocolatey v2.0.0, due to it becoming redundant with a change to `choco list` (see chocolatey/choco#158).
The use of `Get-ChocoPackage` for package search operations (and it's `-Source` parameter) is deprecated, as `Get-ChocoPackage` only looks at installed packages beginning with Chocolatey v2.0.0 and higher. **Users must upgrade to Foil v0.3.0 or higher and migrate package search operations to `Find-ChocoPackage` prior to the release of Chocolatey v2.0.0 to ensure continued compatibility.**
## Legal and Licensing
Foil is licensed under the [MIT license](./LICENSE.txt).