PowerShell Notes for Professionals

PowerShell Notes for Professionals

Tue May 26 2026
3095 words · 16 minutes

PowerShell Notes for Professionals

Versi ini dirapikan dan diperingkas dari dokumen PowerShell Notes for Professionals. Fokusnya adalah navigasi cepat, inti materi, dan daftar konsep/cmdlet penting per bab.

Cara Pakai Dokumen

  • Gunakan Daftar Isi untuk lompat ke bab tertentu.
  • Setiap bab berisi inti materi, topik/bagian, dan cmdlet/konsep cepat.
  • Contoh kode tidak ditampilkan penuh agar dokumen lebih ringkas; gunakan versi lengkap jika perlu detail sintaks.

Daftar Isi

Dasar PowerShell

Objek, Modul, Pipeline, dan Data

Integrasi, Tooling, dan CLI

Automation, Security, Cloud, dan Enterprise


Bab 1: Memulai PowerShell

Inti: Fondasi PowerShell: execution policy, alias, pipeline, pemanggilan .NET, instalasi, komentar, dan pembuatan objek.

Topik penting:

  • 1.1 — Allow scripts stored on your machine to run un-signed 2 …
  • 1.2 — Aliases & Similar Functions 2 …
  • 1.3 — The Pipeline-Using Output from a PowerShell cmdlet 3 …
  • 1.4 — Calling .Net Library Methods 4 …
  • 1.5 — Installation or Setup 5 …
  • 1.6 — Commenting 5 …
  • 1.7 — Creating Objects 6 …

Bab 2: Variabel di PowerShell

Inti: Cara menyimpan dan mengelola nilai memakai variabel, array, scope, assignment multi-variabel, dan penghapusan variabel.

Topik penting:

  • 2.1 — Simple variable 7 …
  • 2.2 — Arrays 7 …
  • 2.3 — List Assignment of Multiple Variables 7 …
  • 2.4 — Scope 8 …
  • 2.5 — Removing a variable 8 …

Bab 3: Operator

Inti: Operator penting untuk perbandingan, aritmatika, assignment, redirection stream, logika, dan manipulasi string.

Topik penting:

  • 3.1 — Comparison Operators 9 …
  • 3.2 — Arithmetic Operators 9 …
  • 3.3 — Assignment Operators 10 …
  • 3.4 — Redirection Operators 10 …
  • 3.5 — Mixing operand types, the type of the left operand dictates the behavior 11 …
  • 3.6 — Logical Operators 11 …
  • 3.7 — String Manipulation Operators 11 …

Bab 4: Operator Khusus

Inti: Operator khusus seperti array expression, call operator, dan dot sourcing untuk menjalankan script di scope tertentu.

Topik penting:

  • 4.1 — Array Expression Operator 13 …
  • 4.2 — Call Operation 13 …
  • 4.3 — Dot sourcing operator 13 …

Bab 5: Operasi Set Dasar

Inti: Operasi koleksi dasar: filter, sort, group, dan select/projection objek PowerShell.

Topik penting:

  • 5.1 — Filtering: Where-Object / where / ? 14 …
  • 5.2 — Ordering: Sort-Object / sort 14 …
  • 5.3 — Grouping: Group-Object / group 15 …
  • 5.4 — Projecting: Select-Object / select 16 …

Cmdlet/konsep cepat: Where-Object, Sort-Object, Group-Object, Select-Object


Bab 6: Logika Kondisional

Inti: Pola percabangan dengan if/else/elseif, negasi, dan perilaku truthy/falsy dalam PowerShell.

Topik penting:

  • 6.1 — if, else and else if 17 …
  • 6.2 — Negation 17 …
  • 6.3 — If conditional shorthand 18 …

Bab 7: Perulangan

Inti: Teknik perulangan: foreach, for, ForEach-Object, continue, break, while, dan do/until.

Topik penting:

  • 7.1 — Foreach 19 …
  • 7.2 — For 19 …
  • 7.3 — ForEach() Method 19 …
  • 7.4 — ForEach-Object 20 …
  • 7.5 — Continue 21 …
  • 7.6 — Break 21 …
  • 7.7 — While 22 …
  • 7.8 — Do 22 …

Cmdlet/konsep cepat: ForEach-Object


Bab 8: Pernyataan Switch

Inti: Penggunaan switch untuk banyak kondisi, termasuk wildcard, regex, file input, exact match, default, dan break.

Topik penting:

  • 8.1 — Simple Switch …
  • 8.2 — Switch Statement with CaseSensitive Parameter …
  • 8.3 — Switch Statement with Wildcard Parameter …
  • 8.4 — Switch Statement with File Parameter …
  • 8.5 — Simple Switch with Default Condition …
  • 8.6 — Switch Statement with Regex Parameter …
  • 8.7 — Simple Switch With Break …
  • 8.8 — Switch Statement with Exact Parameter …
  • 8.9 — Switch Statement with Expressions …

Bab 9: String

Inti: Pengolahan string: multi-line string, here-string, concatenation, karakter escape, literal string, dan format string.

Topik penting:

  • 9.1 — Multiline string …
  • 9.2 — Here-string …
  • 9.3 — Concatenating strings …
  • 9.4 — Special characters …
  • 9.5 — Creating a basic string …
  • 9.6 — Format string …

Bab 10: HashTable

Inti: HashTable sebagai struktur key-value: membuat, membaca, menambah, menghapus, enumerasi, dan looping.

Topik penting:

  • 10.1 — Access a hash table value by key …
  • 10.2 — Creating a Hash Table …
  • 10.3 — Add a key value pair to an existing hash table …
  • 10.4 — Remove a key value pair from an existing hash table …
  • 10.5 — Enumerating through keys and Key-Value Pairs …
  • 10.6 — Looping over a hash table …

Bab 11: Bekerja dengan Objek

Inti: Bekerja dengan objek: inspeksi member, menambah/menghapus properti, membuat objek custom, dan generic class.

Topik penting:

  • 11.1 — Examining an object …
  • 11.2 — Updating Objects …
  • 11.3 — Creating a new object …
  • 11.4 — Creating Instances of Generic Classes …

Bab 12: Fungsi PowerShell

Inti: Pembuatan fungsi: parameter dasar/lanjutan, mandatory parameter, validasi, dan fungsi tanpa parameter.

Topik penting:

  • 12.1 — Basic Parameters …
  • 12.2 — Advanced Function …
  • 12.3 — Mandatory Parameters …
  • 12.4 — Parameter Validation …
  • 12.5 — Simple Function with No Parameters …

Bab 13: Kelas PowerShell

Inti: Class PowerShell: constructor, method, property, overload, inheritance, dan template class.

Topik penting:

  • 13.1 — Listing available constructors for a class …
  • 13.2 — Methods and properties …
  • 13.3 — Constructor overloading …
  • 13.4 — Get All Members of an Instance …
  • 13.5 — Basic Class Template …
  • 13.6 — Inheritance from Parent Class to Child Class …

Bab 14: Modul PowerShell

Inti: Modul PowerShell: manifest, struktur folder, ekspor fungsi/variabel, lokasi modul, dan visibilitas member.

Topik penting:

  • 14.1 — Create a Module Manifest …
  • 14.2 — Simple Module Example …
  • 14.3 — Exporting a Variable from a Module …
  • 14.4 — Structuring PowerShell Modules …
  • 14.5 — Location of Modules …
  • 14.6 — Module Member Visibility …

Bab 15: Profil PowerShell

Inti: Profil PowerShell untuk memuat otomatis fungsi, alias, dan konfigurasi pengguna saat shell dibuka.

Topik penting:

  • 15.1 — Create an basic profle …

Bab 16: Properti Terhitung

Inti: Calculated properties untuk membentuk properti hasil kalkulasi saat memakai Select-Object.

Topik penting:

  • 16.1 — Display fle size in KB-Calculated Properties …

Bab 17: Menggunakan Kelas Statis .NET

Inti: Pemakaian class statis .NET seperti System.Math dan GUID dari PowerShell.

Topik penting:

  • 17.1 — Adding types …
  • 17.2 — Using the .Net Math Class …
  • 17.3 — Creating new GUID instantly …

Bab 18: Variabel Bawaan

Inti: Variabel bawaan penting seperti PSScriptRoot,PSScriptRoot,Args, PSItem,PSItem,?, dan $error.

Topik penting:

  • 18.1 — $PSScriptRoot …
  • 18.2 — $Args …
  • 18.3 — $PSItem …
  • 18.4 — $? …
  • 18.5 — $error …

Cmdlet/konsep cepat: $PSScriptRoot, $Args, $PSItem, $?, $error


Bab 19: Variabel Otomatis

Inti: Variabel otomatis seperti OFS,OFS,null, pid,pid,true/false,false,_/PSItem,danPSItem, danPSVersionTable.

Topik penting:

  • 19.1 — $OFS …
  • 19.2 — $? …
  • 19.3 — $null …
  • 19.4 — $error …
  • 19.5 — $pid …
  • 19.6 — Boolean values …
  • 19.7/_ /PSItem …
  • 19.8 — $PSVersionTable …

Cmdlet/konsep cepat: $OFS, $?, $null, $error, $pid, $_, $PSItem, $PSVersionTable


Bab 20: Variabel Lingkungan

Inti: Mengakses environment variables melalui drive Env: dan notasi $env:.

Topik penting:

  • 20.1 — Windows environment variables are visible as a PS drive called Env: …
  • 20.2 — Instant call of Environment Variables with $env: …

Cmdlet/konsep cepat: $env


Bab 21: Splatting

Inti: Splatting untuk mengirim banyak parameter memakai hashtable agar command lebih ringkas dan reusable.

Topik penting:

  • 21.1 — Piping and Splatting …
  • 21.2 — Passing a Switch parameter using Splatting …
  • 21.3 — Splatting From Top Level Function to a Series of Inner Function …
  • 21.4 — Splatting parameters …

Bab 22: Stream PowerShell

Inti: Stream output PowerShell: output, error, warning, verbose, debug, information, dan preference variable.

Topik penting:

  • 22.1 — Write-Output …
  • 22.2 — Write Preferences …

Cmdlet/konsep cepat: Write-Output


Bab 23: Mengirim Email

Inti: Pengiriman email dengan Send-MailMessage dan SMTPClient.

Topik penting:

  • 23.1 — Send-MailMessage with predefned parameters …
  • 23.2 — Simple Send-MailMessage …
  • 23.3 — SMTPClient-Mail with .txt fle in body message …

Bab 24: PowerShell Remoting

Inti: PowerShell Remoting: Enter-PSSession, Invoke-Command, serialization, trusted hosts, dan cleanup PSSession.

Topik penting:

  • 24.1 — Connecting to a Remote Server via PowerShell …
  • 24.2 — Run commands on a Remote Computer …
  • 24.3 — Enabling PowerShell Remoting …
  • 24.4 — A best practise for automatically cleaning-up PSSessions …

Bab 25: Pipeline PowerShell

Inti: Pipeline berbasis objek dan cara membuat fungsi yang menerima input pipeline.

Topik penting:

  • 25.1 — Writing Functions with Advanced Lifecycle …
  • 25.2 — Basic Pipeline Support in Functions …
  • 25.3 — Working concept of pipeline …

Bab 26: Background Job PowerShell

Inti: Background jobs untuk menjalankan proses panjang tanpa mengunci prompt.

Topik penting:

  • 26.1 — Basic job creation …
  • 26.2 — Basic job management …

Bab 27: Perilaku Return di PowerShell

Inti: Perilaku return dan output pipeline dalam fungsi/script PowerShell.

Topik penting:

  • 27.1 — Early exit …
  • 27.2 — Gotcha! Return in the pipeline …
  • 27.3 — Return with a value …
  • 27.4 — How to work with functions returns …
  • 27.5 — Gotcha! Ignoring unwanted output …

Bab 28: Parsing CSV

Inti: Import CSV dan casting tipe data hasil Import-Csv.

Topik penting:

  • 28.1 — Basic usage of Import-Csv …
  • 28.2 — Import from CSV and cast properties to correct type …

Cmdlet/konsep cepat: Import-Csv


Bab 29: Bekerja dengan File XML

Inti: Membaca, menulis, memanipulasi XML, XPath, namespace, dan XmlWriter.

Topik penting:

  • 29.1 — Accessing an XML File …
  • 29.2 — Creating an XML Document using XmlWriter() …
  • 29.3 — Adding snippets of XML to current XMLDocument …

Bab 30: RESTful API

Inti: Konsumsi REST API memakai Invoke-RestMethod untuk GET, POST, PUT, dan DELETE.

Topik penting:

  • 30.1 — Post Message to hipChat …
  • 30.2 — Using REST with PowerShell Objects to GET and POST many items …
  • 30.3 — Use Slack.com Incoming Webhooks …
  • 30.4 — Using REST with PowerShell Objects to Get and Put individual data …
  • 30.5 — Using REST with PowerShell to Delete items …

Bab 31: Query SQL PowerShell

Inti: Menjalankan query SQL dari PowerShell.

Topik penting:

  • 31.1 — SQLExample …
  • 31.2 — SQLQuery …

Bab 32: Regular Expression

Inti: Regex untuk match, replace, escape karakter khusus, dan multiple matches.

Topik penting:

  • 32.1 — Single match …
  • 32.2 — Replace …
  • 32.3 — Replace text with dynamic value using a MatchEvalutor …
  • 32.4 — Escape special characters …
  • 32.5 — Multiple matches …

Bab 33: Alias

Inti: Membaca dan membuat alias cmdlet.

Topik penting:

  • 33.1 — Get-Alias …
  • 33.2 — Set-Alias …

Cmdlet/konsep cepat: Get-Alias, Set-Alias


Bab 34: Progress Bar

Inti: Menampilkan progress proses dengan Write-Progress.

Topik penting:

  • 34.1 — Simple use of progress bar …
  • 34.2 — Usage of inner progress bar …

Bab 35: Command-Line PowerShell.exe

Inti: Opsi command-line PowerShell.exe untuk menjalankan command, script, policy, profile, dan window style.

Topik penting:

  • 35.1 — Executing a command 100 …
  • 35.2 — Executing a script fle 101 …

Bab 36: Penamaan Cmdlet

Inti: Standar penamaan cmdlet Verb-Noun.

Topik penting:

  • 36.1 — Verbs 102 …
  • 36.2 — Nouns 102 …

Bab 37: Menjalankan Executable

Inti: Menjalankan aplikasi GUI/console dan membaca exit code.

Topik penting:

  • 37.1 — GUI Applications 103 …
  • 37.2 — Console Streams 103 …
  • 37.3 — Exit Codes 103 …

Bab 38: Prasyarat Script

Inti: Menetapkan prasyarat script seperti versi minimum dan administrator.

Topik penting:

  • 38.1 — Enforce minimum version of PowerShell host 104 …
  • 38.2 — Enforce running the script as administrator …

Bab 39: Sistem Bantuan

Inti: Memakai Get-Help, update help, contoh, full help, online help, dan parameter-specific help.

Topik penting:

  • 39.1 — Updating the Help System …
  • 39.2 — Using Get-Help …
  • 39.3 — Viewing online version of a help topic …
  • 39.4 — Viewing Examples …
  • 39.5 — Viewing the Full Help Page …
  • 39.6 — Viewing help for a specifc parameter …

Cmdlet/konsep cepat: Get-Help


Bab 40: Modul, Script, dan Fungsi

Inti: Perbedaan function, script, module, dan advanced function.

Topik penting:

  • 40.1 — Function …
  • 40.2 — Script …
  • 40.3 — Module …
  • 40.4 — Advanced Functions …

Bab 41: Konvensi Penamaan

Inti: Konvensi penamaan fungsi agar konsisten dan mudah dipahami.

Topik penting:

  • 41.1 — Functions …

Bab 42: Parameter Umum

Inti: Parameter umum seperti ErrorAction untuk mengontrol error.

Topik penting:

  • 42.1 — ErrorAction parameter …

Bab 43: Parameter Set

Inti: Parameter set untuk membatasi kombinasi parameter dan memaksa pilihan valid.

Topik penting:

  • 43.1 — Parameter set to enforce the use of a parameter when a other is selected …
  • 43.2 — Parameter set to limit the combination of parameters …

Bab 44: Parameter Dinamis

Inti: Dynamic parameter untuk menambahkan parameter saat runtime.

Topik penting:

  • 44.1 — “Simple”dynamic parameter …

Bab 45: GUI di PowerShell

Inti: Pembuatan GUI WPF sederhana dari PowerShell.

Topik penting:

  • 45.1 — WPF GUI for Get-Service cmdlet …

Cmdlet/konsep cepat: Get-Service


Bab 46: URL Encode/Decode

Inti: Encode dan decode URL memakai HttpUtility atau URI class.

Topik penting:

  • 46.1 — Encode Query String with[System.Web.HttpUtility]::UrlEncode()
  • 46.2 — Quick Start: Encoding …
  • 46.3 — Quick Start: Decoding …
  • 46.4 — Encode Query String with[uri]::EscapeDataString()
  • 46.5 — Decode URL with[uri]::UnescapeDataString()
  • 46.6 — Decode URL with[System.Web.HttpUtility]::UrlDecode()

Bab 47: Penanganan Error

Inti: Jenis error dan dasar penanganan error.

Topik penting:

  • 47.1 — Error Types …

Bab 48: Manajemen Paket

Inti: Mencari, menginstall, update, dan uninstall modul PowerShell.

Topik penting:

  • 48.1 — Create the default PowerShell Module Repository …
  • 48.2 — Find a module by name …
  • 48.3 — Install a Module by name …
  • 48.4 — Uninstall a module my name and version …
  • 48.5 — Update a module by name …
  • 48.6 — Find a PowerShell module using a pattern …

Bab 49: Komunikasi TCP

Inti: Komunikasi TCP listener/sender menggunakan PowerShell.

Topik penting:

  • 49.1 — TCP listener …
  • 49.2 — TCP Sender …

Bab 50: Workflow PowerShell

Inti: Workflow PowerShell untuk proses background, paralel, dan input parameter.

Topik penting:

  • 50.1 — Workfow with Input Parameters …
  • 50.2 — Simple Workfow Example …
  • 50.3 — Run Workfow as a Background Job …
  • 50.4 — Add a Parallel Block to a Workfow …

Bab 51: Managed Code C# / VB

Inti: Menyematkan kode C# atau VB.NET dengan Add-Type.

Topik penting:

  • 51.1 — C# Example …
  • 51.2 — VB.NET Example …

Bab 52: Download Artifact dari Artifactory

Inti: Contoh script untuk mengambil artifact terbaru dari Artifactory.

Topik penting:

  • 52.1 — PowerShell Script for downloading the latest artifact …

Bab 53: Comment-Based Help

Inti: Help berbasis komentar agar fungsi/script dapat dibaca oleh Get-Help.

Topik penting:

  • 53.1 — Function comment-based help …
  • 53.2 — Script comment-based help …

Bab 54: Modul Archive

Inti: Compress-Archive dan Expand-Archive untuk ZIP.

Topik penting:

  • 54.1 — Compress-Archive with wildcard …
  • 54.2 — Update existing ZIP with Compress-Archive …
  • 54.3 — Extract a Zip with Expand-Archive …

Cmdlet/konsep cepat: Compress-Archive, Expand-Archive


Bab 55: Otomasi Infrastruktur

Inti: Otomasi infrastruktur dan contoh test integrasi black-box.

Topik penting:

  • 55.1 — Simple script for black-box integration test of console applications …

Bab 56: PSScriptAnalyzer

Inti: PSScriptAnalyzer untuk static analysis script PowerShell.

Topik penting:

  • 56.1 — Analyzing scripts with the built-in preset rulesets …
  • 56.2 — Analyzing scripts against every built-in rule …
  • 56.3 — List all built-in rules …

Bab 57: Desired State Configuration DSC

Inti: DSC untuk mendefinisikan konfigurasi target dan resource.

Topik penting:

  • 57.1 — Simple example-Enabling WindowsFeature …
  • 57.2 — Starting DSC (mof) on remote machine …
  • 57.3 — Importing psd1 (data fle) into local variable …
  • 57.4 — List available DSC Resources …
  • 57.5 — Importing resources for use in DSC …

Bab 58: ShouldProcess

Inti: ShouldProcess untuk dukungan -WhatIf dan -Confirm.

Topik penting:

  • 58.1 — Full Usage Example …
  • 58.2 — Adding-WhatIf and-Confrm support to your cmdlet …
  • 58.3 — Using ShouldProcess() with one argument …

Bab 59: Scheduled Tasks

Inti: Scheduled Tasks untuk menjalankan script PowerShell secara terjadwal.

Topik penting:

  • 59.1 — Run PowerShell Script in Scheduled Task …

Bab 60: Modul ISE

Inti: PowerShell ISE dan fitur scripting/debugging.

Topik penting:

  • 60.1 — Test Scripts …

Bab 61: Resource DSC Berbasis Class

Inti: Membuat DSC resource berbasis class.

Topik penting:

  • 61.1 — Create a DSC Resource Skeleton Class …
  • 61.2 — DSC Resource Skeleton with Key Property …
  • 61.3 — DSC Resource with Mandatory Property …
  • 61.4 — DSC Resource with Required Methods …

Bab 62: WMI dan CIM

Inti: Query WMI/CIM, namespace, class, dan instance.

Topik penting:

  • 62.1 — Querying objects …
  • 62.2 — Classes and namespaces …

Bab 63: Modul ActiveDirectory

Inti: Cmdlet ActiveDirectory untuk user, group, computer, dan object AD.

Topik penting:

  • 63.1 — Users …
  • 63.2 — Module …
  • 63.3 — Groups …
  • 63.4 — Computers …
  • 63.5 — Objects …

Bab 64: Modul SharePoint

Inti: Modul SharePoint untuk snap-in, list, dan feature site collection.

Topik penting:

  • 64.1 — Loading SharePoint Snap-In …
  • 64.2 — Iterating over all lists of a site collection …
  • 64.3 — Get all installed features on a site collection …

Bab 65: Psake

Inti: Psake untuk build/task automation.

Topik penting:

  • 65.1 — Basic outline …
  • 65.2 — FormatTaskName example …
  • 65.3 — Run Task conditionally …
  • 65.4 — ContinueOnError …

Bab 66: Pester

Inti: Pester untuk unit testing PowerShell.

Topik penting:

  • 66.1 — Getting Started with Pester …

Bab 67: Secret dan Credential

Inti: Menangani credential dan secret dengan SecureString/Export-CliXml.

Topik penting:

  • 67.1 — Accessing the Plaintext Password …
  • 67.2 — Prompting for Credentials …
  • 67.3 — Working with Stored Credentials …
  • 67.4 — Storing the credentials in Encrypted form and Passing it as parameter when Required

Bab 68: Security dan Cryptography

Inti: Hashing dan kriptografi via .NET.

Topik penting:

  • 68.1 — Calculating a string’s hash codes via .Net Cryptography …

Bab 69: Signing Scripts

Inti: Menandatangani script dan mengatur execution policy.

Topik penting:

  • 69.1 — Signing a script …
  • 69.2 — Bypassing execution policy for a single script …
  • 69.3 — Changing the execution policy using Set-ExecutionPolicy …
  • 69.4 — Get the current execution policy …
  • 69.5 — Getting the signature from a signed script …
  • 69.6 — Creating a self-signed code signing certifcate for testing …

Cmdlet/konsep cepat: Set-ExecutionPolicy


Bab 70: Anonimisasi IP

Inti: Anonimisasi IPv4/IPv6 dalam file teks dengan regex.

Topik penting:

  • 70.1 — Anonymize IP address in text fle …

Bab 71: AWS Rekognition

Inti: Contoh AWS Rekognition dari PowerShell.

Topik penting:

  • 71.1 — Detect Image Labels with AWS Rekognition …
  • 71.2 — Compare Facial Similarity with AWS Rekognition …

Bab 72: AWS S3

Inti: Operasi dasar AWS S3: bucket, upload, dan delete.

Topik penting:

  • 72.1 — Create a new S3 Bucket …
  • 72.2 — Upload a Local File Into an S3 Bucket …
  • 72.3 — Delete a S3 Bucket …


Thanks for reading!

PowerShell Notes for Professionals

Tue May 26 2026
3095 words · 16 minutes