Powershell examples.
- README
- Contents
- 📋 Prereqs
- Test
- 🏠 Enable brew
- 00 - Basic Commands
- 01 - Template
- 02 - JSON
- 03 - Docker
- 04 - Mongo Module
- 05 - Pester
- 06 - AWS CLI
- 07 - String Generation
- 08 - Iterate Folders
- 09 - Jupyter
- 10 - awsbatch
- 10 - awsecs
- 11 - logging
- 12 - remoting
- 17 - oh-my-posh
- 19 - PSScriptAnalyzer
- 20 - pode webserver
- 20 - AST
- 22 - dotnet
- 24 - trint apis
- 25 - windows helpers
- 👀 Resources
Ensure that Powershell is upgraded to the latest version here
Switch the terminal app to point to C:\Program Files\PowerShell\7\pwsh.exe
to start and configure oh-my-posh
chrisguest75/powershell_examples/17_ohmyposh/README.md
# current version
brew info powershell
# install
brew install powershell
# upgrade
brew upgrade powershell
It looks like Linux Brew does not have Powershell for Linux.
Based on powershell/scripting/install/install-ubuntu
###################################
# Prerequisites
# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common
# Get the version of Ubuntu
source /etc/os-release
# Download the Microsoft repository keys
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
# Register the Microsoft repository keys
sudo dpkg -i packages-microsoft-prod.deb
# Delete the the Microsoft repository keys file
rm packages-microsoft-prod.deb
# Update the list of packages after we added packages.microsoft.com
sudo apt-get update
###################################
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
$PSVersionTable
# open shell
pwsh
# check versions
$psversiontable
# list the currently installed modules.
Get-InstalledModule
Get-Module -ListAvailable
# Troubleshooting
# if modules are failing to load and you already have the modules installed try upgrading them.
Update-AWSToolsModule
# add brew support to powershell
Add-Content -Path $PROFILE.CurrentUserAllHosts -Value '$(/usr/local/bin/brew shellenv) | Invoke-Expression'
Demonstrate some basic commands in Powershell
Steps README.md
A template script as an example to create others.
Steps README.md
Demonstrate how to deal with json
data in Powershell
Steps README.md
Demonstrate how to run powershell inside a docker container
Steps README.md
Demonstrate how to install and use a mongo
packages
Steps README.md
Demonstrate how to run pester to test a script
Steps README.md
Demonstrate how to use AWS cli and parse answers with powershell
.
Steps README.md
Demonstrate text generation effects.
Steps README.md
Demonstrate iterating over files and directories
Steps README.md
Demonstrate how to get a jupyter
server running
Steps README.md
Demonstrate using the official AWS Powershell Module for Batch
Steps README.md
Demonstrate using the official AWS Powershell Module for ECS
Steps README.md
Demonstrate logging libraries for Powershell
Steps README.md
Configure SSH Remoting in Powershell.
Steps README.md
Demonstrate some oh-my-posh
basics.
Steps README.md
Demonstrate use of PSScriptAnalyzer
to lint code.
Steps README.md
Use pode
to build a simple webserver.
Steps README.md
Demonstrate use to parser and AST on scripts.
Steps README.md
Demonstrate using dotnet core libraries
Steps README.md
Demonstate using trint
live API
Steps README.md
A set of helpers for working with Windows.
Steps README.md