Languages
PowerShell
Installing PowerShell on Ubuntu in TIDE
PowerShell
PowerShell is a cross-platform task automation solution consisting of a command-line shell, a scripting language, and a configuration management framework built on .NET.
Installation
Install PowerShell on Ubuntu via the official Microsoft repository:
apt update
apt install -y wget apt-transport-https software-properties-common
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt update
apt install -y powershellVerification
Verify PowerShell is installed:
pwsh --versionInteractive Shell
Launch PowerShell interactively:
pwshExecute PowerShell commands:
PS > Write-Host "Hello from PowerShell!"To exit PowerShell, type exit.
Hello World Example
Create a PowerShell script file named hello.ps1:
echo 'Write-Host "Hello, PowerShell!"' > hello.ps1Run the script using pwsh:
pwsh hello.ps1