🍬 What is a PnPWls2 Candy?
A "Candy" is simply a bash script to be applied on a WSL\Linux environment .
It can be use to install applications, configure settings or even populate linux environments (yeah , #sky is the limit !) .
Candy Pot ...
PnP Wsl2 Candy Pot has around 25 items which can help setting up, configuring and maintaining the linux environments inside our WSL instances. Each of the cmdlets is documented to aid in learning how to use it . Hey ... you can even add your own !
Azure
🍭ub-az-AzureCli
Installs Azure Cli .
Azure Cli is a Microsoft Azure command-line tool used to create and manage Azure resources
Add-PnPWsl2Candy -Candy ub-az-AzureCli -Instance myinstance
🍭ub-az-AzureCli+CreatePAT
Installs Azure Cli and CreatePAT candy
A personal access token contains your security credentials for Azure DevOps.
Add-PnPWsl2Candy -Candy ub-az-AzureCli+CreatePAT -Instance myinstance
🍭ub-az-CreatePAT
Creates a AzureDevOps Personal Access Token that is valid for 1 year
Add-PnPWsl2Candy -Candy ub-az-CreatePAT -Instance myinstance
🍭ub-az-SSHKeyAddToAzDevops
This script is used to add a WSL SSH key to an Azure DevOps organization
- It prompts the user to enter the Azure DevOps organization and the SSH key name
- Gets the SSH key from the .ssh directory
- Adds the SSH key to the Azure DevOps organization
Add-PnPWsl2Candy -Candy ub-az-SSHKeyAddToAzDevops -Instance myinstance
M365
🍭ub-m365-PnPCliMicrosoft365
Installs @pnp/cli-microsoft365.
pnp/cli-microsoft365 is a command-line interface (CLI) that allows users to manage their Microsoft 365 tenant and SharePoint Framework projects on any platform
Add-PnPWsl2Candy -Candy ub-m365-PnPCliMicrosoft365 -Instance myinstance
🍭ub-m365-PnPPowerShell
Installs PnP.PowerShell.
PnP.PowerShell is a cross-platform PowerShell Module that provides over 650 cmdlets to work with Microsoft 365 environments
Add-PnPWsl2Candy -Candy ub-m365-PnPPowerShell -Instance myinstance
🍭ub-m365-PSCore+PnPPowerShell
This script will install PowerShell Core and PnP.PowerShell
Add-PnPWsl2Candy -Candy ub-m365-PSCore+PnPPowerShell -Instance myinstance
Node
🍭ub-node-Install
Installs a specified version of Node.js using the Node Version Manager (NVM).
- It first checks if the requested version is already installed.
- If the requested version is not installed, the script installs it using NVM
- Sets installed version as the current version
Add-PnPWsl2Candy -Candy ub-node-Install -Instance myinstance
🍭ub-node-Nvm
Installs the Node Version Manager (nvm).
Node Version Manager (NVM) is a tool used to download, install, manage, and upgrade Node.js versions
Add-PnPWsl2Candy -Candy ub-node-Nvm -Instance myinstance
🍭ub-node-RimRaf
Installs the RimRaf Node tool.
RimRaf is a utility for Node.js that provides a faster alternative to the 'rm -rf' shell command.
It allows for deep recursive deletion of files and folders
Add-PnPWsl2Candy -Candy ub-node-RimRaf -Instance myinstance
PowerShell
🍭ub-pwsh-PowerShellCore
Installs the latest version of PowerShell Core.
PowerShell Core is a cross-platform automation and configuration tool/framework that works on Windows, Linux, and macOS. It is based on .NET Core, which allows it to be multiplatform
Add-PnPWsl2Candy -Candy ub-pwsh-PowerShellCore -Instance myinstance
Python
🍭ub-python-Miniconda-TensorFlow-DirectML
Set up TensorFlow with DirectML (run machine learning (ML) training on existing hardware).
Before installing the TensorFlow with DirectML package inside WSL, you need to install the latest drivers from your GPU hardware vendor. These drivers enable the Windows GPU to work with WSL. AMD Intel AMD
To enable TensorFlow with DirectML in WSL, we are installing Miniconda,Tensorflow and DirectML.This candy does all the work for you Instructions followed from Microsoft
Miniconda is a small bootstrap version of Anaconda: includes conda, Python, usefull pkgs Tensorflow is a open source machine learning platform
DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning
Add-PnPWsl2Candy -Candy ub-python-Miniconda-TensorFlow-DirectML -Instance myinstance
SharePoint Framework
🍭ub-spfx-FullDevEnvironment
This script will install all needed assets for SharePoint Framework Development environment following Microsoft guidance mentioned here
- It will install nvm , node (you can select the version), gulp-cli, yeoman, microsoft yeoman generator, and spfxfastserve
- Create the sfpx self-signed developer certificate
- Import the certificate to your windows local computer store
- Will also create the sshkey in wsl updating it to your windows host
- Import sshkey into your Azure Devops instance
Add-PnPWsl2Candy -Candy ub-spfx-FullDevEnvironment -Instance myinstance
🍭ub-spfx-git-Config
This script is used to configure git (username;useremail).
Add-PnPWsl2Candy -Candy ub-spfx-git-Config -Instance myinstance
🍭ub-spfx-gulp-TrustDevCert
This script is will install the SharePoint Framework Development Certificate.
Add-PnPWsl2Candy -Candy ub-spfx-gulp-TrustDevCert -Instance myinstance
🍭ub-spfx-gulp-Yo-Mgen-Fs
This script is used to install gulp-cli yo @microsoft/generator-sharepoint spfx-fast-serve.
Add-PnPWsl2Candy -Candy ub-spfx-gulp-Yo-Mgen-Fs -Instance myinstance
System
🍭ub-sys-wsl-Initialize
Initializes a ubuntu environment
Add-PnPWsl2Candy -Candy ub-sys-wsl-Initialize -Instance myinstance
🍭ub-sys-wsl-SSHKeyGenerate
This script is a bash shell script that will create an SSH key in WSL and will update your windows host with the same key
Add-PnPWsl2Candy -Candy ub-sys-wsl-SSHKeyGenerate -Instance myinstance
🍭ub-sys-wsl-SuperUser
This script is a bash shell script that sets the default user for a WSL instance
Add-PnPWsl2Candy -Candy ub-sys-wsl-SuperUser -Instance myinstance
🍭ub-sys-wsl-Updates
This script is a bash shell script that updates the current Linux distribution packages
Add-PnPWsl2Candy -Candy ub-sys-wsl-Updates -Instance myinstance
🍭ub-sys-wsl-Utils
This script is a bash shell script that installs WSL utilities
Add-PnPWsl2Candy -Candy ub-sys-wsl-Utils -Instance myinstance
MyScripts
🍭ub-myscripts-eggxample1
Installs gedit linux app
Eggxample1 is a script that installs a linux app (gedit)
After execution take a peek at your Windows Start Menu, you should see a new entry for the app.Purpose : show how to install a package and how to run linux apps in windows.
Add-PnPWsl2Candy -Candy ub-myscripts-eggxample1 -Instance myinstance
🍭ub-myscripts-eggxample2
Eggxample2 is a script that runs a RickRool PowerShell script.
Eggxample2 is a script that runs a PowerShell script that calls a windows process and plays a rickroll.
Purpose : show how to run a process in windows within wsl.
Add-PnPWsl2Candy -Candy ub-myscripts-eggxample2 -Instance myinstance
🍭ub-myscripts-eggxample3
Installs linux x11 apps and shows a clock and a calc
Eggxample1 is a script that installs X11 apps (linux), shows a linux clock and a linux calc. Purpose is to show how to install a package and run a process in linux.
Add-PnPWsl2Candy -Candy ub-myscripts-eggxample3 -Instance myinstance
🍭ub-myscripts-MyFirstScript
Simple Hello World!
Purpose is to have a .sh baseline.
Add-PnPWsl2Candy -Candy ub-myscripts-MyFirstScript -Instance myinstance
\