Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ironmansoftware/universal-samples
Ironman Software PowerShell samples.
https://github.com/ironmansoftware/universal-samples
Last synced: about 2 months ago
JSON representation
Ironman Software PowerShell samples.
- Host: GitHub
- URL: https://github.com/ironmansoftware/universal-samples
- Owner: ironmansoftware
- License: mit
- Created: 2020-12-28T18:07:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-29T04:28:02.000Z (about 4 years ago)
- Last Synced: 2024-05-23T00:32:13.823Z (8 months ago)
- Language: PowerShell
- Size: 32.2 KB
- Stars: 21
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ironmansoftware/universal-samples - Ironman Software PowerShell samples. (PowerShell)
README
# PowerShell Universal Samples
This repository contains samples for PowerShell Universal.
# Licensing
Samples are licensed under MIT.
# Contributing
We accept pull requests to this repository.
## PowerShell Universal Extension
Samples that are added to the repository will automatically show up in the [PowerShell Universal VS Code extension](https://marketplace.visualstudio.com/items?itemName=ironmansoftware.powershell-universal).
## Single File Samples
Single file samples should be stored within the correct folder as a `.ps1` file. You should include a comment at the top within information about your sample. It should at least contain the `title`, `description`, `version`, and `file`. The comment should be in YAML syntax.
```powershell
<#
title: A title for your sample
description: A description of your sample
file: Includes the file to update.
version: The minium version number of Universal required for this sample
#>
```The rest of your sample can just be PowerShell. The PowerShell script will be inserted into the appropriate file when the sample is used.
```powershell
<#
title: A basic endpoint
description: A cool endpoint that does stuff.
file: endpoints.ps1
version: 1.5.8
#>
New-PSUEndpoint -Method GET -Url /get -Endpoint {
"Hello, world"
}
```## Multi-File Samples
Multi-file samples can be included in a directory with a `manifest.yml` file. The manifest file should include all the same information as the single file sample; except the `file`.
```yml
title: Image Processing Dashboard
description: A dashboard that processes an image
version: 1.5.8
```You can then include multiple files in the folder. The files should match the configuration files you wish to update. The PowerShell script will be inserted into existing files.