https://github.com/jrmycanady/psminimize
minimizer for powershell script files
https://github.com/jrmycanady/psminimize
invoke-vmscript minimize minimizer powercli powershell
Last synced: about 1 month ago
JSON representation
minimizer for powershell script files
- Host: GitHub
- URL: https://github.com/jrmycanady/psminimize
- Owner: jrmycanady
- License: mit
- Created: 2018-08-01T20:22:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-03T14:18:46.000Z (over 7 years ago)
- Last Synced: 2024-11-16T09:34:38.977Z (over 1 year ago)
- Topics: invoke-vmscript, minimize, minimizer, powercli, powershell
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# psminimize
psminimize is a simple utility that tries to minimize a powershell script file. It only uses basic logic to perform the minimization but in general can reduce a ps1 file by half depending on the variable name length. As this is really just a fancy find and replace there are some edge cases to watch out for.
## Limitations
* Function parameter variables will be renamed. If you define the function/cmdlet within the script and rely on it's name when calling later you will need to manually fix the calling statement.
## Usage
`psminimize -s script.ps1 -o script.min.ps`
|long|short|description|required|
|----|----|----|----|
|script-path|s|The path to the script file to minimize.|true|
|output-path|o|The path to write the script two.|true|
## Example
```
./psminimize -s sample.ps1 -o test.min.ps1
minimization completed in 0.015845 seconds and reduced by 54.165660%
```