DevOps & Cloud
0/5 sections
0%

PowerShell

PowerShell is Microsoft's cross-platform task automation framework using cmdlets with noun-verb naming, pipelines, and deep .NET integration for Windows, Azure, and DevOps automation.

1PowerShell Fundamentals

powershell
$name = "Sufi"
$age = 30
$active = $true

# Arrays & Hash Tables $fruits = @("apple", "banana", "cherry") $fruits[0] # apple $fruits.Count # 3

$person = @{ Name = "Sufi"; Age = 30 } $person.Name # Sufi $person.Keys # Name, Age

# String operations "Hello, $name!" "Name: $($name.ToUpper())"

# Environment variables $env:USERPROFILE $env:PATH ```

2Cmdlets & Pipeline

powershell
# Verb-Noun naming convention
Get-Process
Get-Process -Name "chrome"
Stop-Process -Name "notepad" -Force
Get-Service | Where-Object Status -eq "Running"

# Pipeline chaining Get-Process | Where-Object { $_.CPU -gt 10 } | Sort-Object CPU -Descending | Select-Object Name, CPU, WorkingSet -First 10 | Format-Table -AutoSize

# Common file cmdlets Get-ChildItem C:\ -Recurse -Filter "*.log" Get-Content .\log.txt Set-Content .\output.txt -Value "Hello" Add-Content .\log.txt -Value "New line" Copy-Item source.txt destination.txt Remove-Item old_file.txt -Force New-Item -ItemType Directory -Path ".\reports"

# Getting help Get-Help Get-Process -Examples Get-Command *-Service ```

3Functions & Control Flow

powershell
function Get-UserInfo {
    param(
        [Parameter(Mandatory)]
        [string]$Username,
        [int]$MaxResults = 10,
        [switch]$IncludeGroups
    )

Write-Verbose "Looking up $Username..." $user = Get-ADUser -Identity $Username -Properties * if ($null -eq $user) { Write-Error "User '$Username' not found"; return }

return [PSCustomObject]@{ Name = $user.DisplayName Email = $user.EmailAddress Enabled = $user.Enabled } }

foreach ($server in $servers) { if (Test-Connection $server -Quiet) { Write-Host "$server is online" -ForegroundColor Green } else { Write-Warning "$server is offline" } }

switch ($errorCode) { 200 { "OK" }; 404 { "Not Found" }; 500 { "Server Error" } default { "Unknown: $errorCode" } } ```

4File System & JSON

powershell
# File operations
$files = Get-ChildItem -Path "C:\Logs" -Filter "*.log" -Recurse
$files | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-30) } |
    Remove-Item -Verbose

# CSV $data = Import-Csv .\employees.csv $data | Where-Object Department -eq "Engineering" | Measure-Object Salary -Average -Sum $results | Export-Csv .\report.csv -NoTypeInformation

# JSON $config = Get-Content .\config.json | ConvertFrom-Json $config.database.host $config | ConvertTo-Json -Depth 5 | Set-Content .\config.json

# Registry $regPath = "HKLM:\SOFTWARE\MyApp" New-Item -Path $regPath -Force Set-ItemProperty -Path $regPath -Name "Version" -Value "2.0" Get-ItemProperty -Path $regPath ```

5Azure & Active Directory Automation

powershell
# Connect to Azure
Connect-AzAccount
Set-AzContext -SubscriptionId "your-sub-id"

$vm = Get-AzVM -ResourceGroupName "prod-rg" | Where-Object PowerState -eq "VM running"

# Azure Storage cleanup $ctx = New-AzStorageContext -StorageAccountName "myaccount" -UseConnectedAccount Get-AzStorageBlob -Container "logs" -Context $ctx | Where-Object { $_.LastModified -lt (Get-Date).AddDays(-90) } | Remove-AzStorageBlob

# Bulk user creation Import-Module ActiveDirectory $newUsers = Import-Csv .\new_employees.csv foreach ($u in $newUsers) { New-ADUser -Name $u.Name -GivenName $u.FirstName -Surname $u.LastName -UserPrincipalName "$($u.Username)@company.com" -Department $u.Department -Enabled $true -AccountPassword (ConvertTo-SecureString $u.TempPassword -AsPlainText -Force) Add-ADGroupMember -Identity $u.Department -Members $u.Username } ``

Explore the Full Portfolio

This is the complete portfolio of Sufi Khan Sulaiman, a technology leader specialising in B2B commerce and digital automation. Start from the Home page for the overview, then move through two decades of career experience across FLIR Systems, Lorex Technology, and 1c Platform, and the full catalogue of project case studies spanning headless commerce migrations, AI recommendation engines, and multi-channel fulfilment systems.

The skills and certifications page maps the technical and leadership capabilities behind the work, while the articles and the knowledge base break down the thinking into actionable frameworks. For hands-on learning, the tutorials and applications sections cover practical builds from front-end fundamentals to full-stack web apps.

For consulting engagement, the expertise page outlines service offerings, the ecommerce hub covers platform architecture and automation strategy, and the ecommerce guide (PDF) is a downloadable 55-page field manual. When you are ready to talk, the contact page is the direct line.