Skip to content

Examples of Powershell Core scripts and snippets

Notifications You must be signed in to change notification settings

LopeAriyo/powershell_examples

 
 

Repository files navigation

README

Powershell examples.

TODO:

  • interesting libraries (git) https://www.powershellgallery.com/packages/PowerGit/0.9.0
  • Create juypter example
  • Plaster
  • NPM package example - using from typescript
  • $isDotSourced = $MyInvocation.InvocationName -eq '.' -or $MyInvocation.Line -eq ''
  • -passthru
  • fix help for about_
  • error handling

Install

# install
brew install powershell
# open shell
pwsh
Add-Content -Path $PROFILE.CurrentUserAllHosts -Value '$(/usr/local/bin/brew shellenv) | Invoke-Expression'

00 - Basic Commands

Demonstrate some basic commands in Powershell
Steps README.md

01 - Template

A template script as an example to create others.
Steps README.md

02 - JSON

Demonstrate how to deal with json data in Powershell
Steps README.md

03 - Docker

Demonstrate how to run powershell inside a docker container
Steps README.md

04 - Mongo Module

Demonstrate how to install and use a mongo packages
Steps README.md

05 - Pester

Demonstrate how to run pester to test a script
Steps README.md

06 - AWS CLI

Demonstrate how to use AWS cli and parse answers with powershell.
Steps README.md

07 - String Generation

Demonstrate text generation effects.
Steps README.md

08 - Iterate Folders

Demonstrate iterating over files and directories
Steps README.md

10 - awsbatch

Demonstrate using the official AWS Powershell Module for Batch
Steps README.md

10 - awsecs

Demonstrate using the official AWS Powershell Module for ECS
Steps README.md

11 - logging

Demonstrate logging libraries for Powershell
Steps README.md

12 - remoting

Configure SSH Remoting in Powershell.
Steps README.md

17 - oh-my-posh

Demonstrate some oh-my-posh basics Steps README.md

19 - PSScriptAnalyzer

Demonstrate use of PSScriptAnalyzer to lint code.
Steps README.md

20 - pode webserver

Use pode to build a simple webserver.
Steps README.md

20 - AST

Demonstrate use to parser and AST on scripts.
Steps README.md

22 - dotnet

Demonstrate using dotnet core libraries
Steps README.md

Resources

  • Official product documentation for PowerShell here
  • adamdriscoll/awesome-powershell repo here
  • cheatsheet powershell

About

Examples of Powershell Core scripts and snippets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 96.3%
  • Dockerfile 2.5%
  • Other 1.2%