Simple Calculator - Powershell Typing CST Test
Loading…
Simple Calculator — Powershell Code
Performs basic arithmetic operations using functions.
function Add($a, $b) { $a + $b }
function Subtract($a, $b) { $a - $b }
function Multiply($a, $b) { $a * $b }
function Divide($a, $b) { $a / $b }
Write-Host "Add 5 + 3: $(Add 5 3)"
Write-Host "Subtract 5 - 3: $(Subtract 5 3)"
Write-Host "Multiply 5 * 3: $(Multiply 5 3)"
Write-Host "Divide 6 / 2: $(Divide 6 2)"Powershell Language Guide
PowerShell is a cross-platform task automation and configuration management framework, combining a command-line shell, scripting language, and object-based pipeline built on .NET. It is widely used for DevOps, system administration, cloud automation, and enterprise workflows.
Primary Use Cases
- ▸System administration & configuration
- ▸Cloud automation (Azure & Microsoft 365)
- ▸DevOps & CI/CD pipelines
- ▸Remote management & orchestration
- ▸File management & process automation
- ▸Infrastructure as Code (IaC) scripting
Notable Features
- ▸Object-based pipeline
- ▸Rich cmdlets and modules
- ▸Native .NET integration
- ▸Cross-platform support
- ▸Powerful remoting capabilities
Origin & Creator
Created by Microsoft, originally released in 2006 as 'Monad' before becoming Windows PowerShell, then PowerShell Core (open-source).
Industrial Note
PowerShell dominates enterprise automation across Windows Server, Azure, Active Directory, Intune, Office 365, and hybrid-cloud DevOps environments.