Powershell
Articles in this category.
- Create a local PowerShell repository and install a module from it — Register a local folder as a PowerShell repository and install a module from a .nupkg package.
- Load public and private functions in a PowerShell module — Automatically load the public (exported) and private functions of a PowerShell module from the public and private folders.
- Manage Windows DNS records with PowerShell — List DNS zones and records and change the address of an A record with the DnsServer module.
- PowerShell — Articles in the PowerShell category (1).
- PowerShell and Active Directory: Get-ADUser examples — Find users, expired accounts, groups, CSV exports and photos with the ActiveDirectory cmdlets.
- PowerShell: force TLS 1.2 ("unexpected error occurred on a send") — Check and force TLS 1.2 in PowerShell and .NET, verify SCHANNEL/WinHTTP registry settings, and skip certificate checks for tests.
- PowerShell: free space of a network share with event log alerts — Map a share, compute the free percentage and write a Warning or Error event.
- PowerShell: get the current script path and name — Comparison of $PSCommandPath and the $MyInvocation properties, in a script and inside a function.
- PowerShell: last logon time of Active Directory users — PowerShell script that queries every domain controller to export each AD user's real last logon time.
- PowerShell: module paths and updates — How PSModulePath works, importing modules from outside the path, install scopes and updating modules.
- PowerShell: run an SSH command through a bastion (ProxyJump) — Run a command on a Linux server behind a bastion with OpenSSH -J, or with Posh-SSH.
- PowerShell: run a script as another account with a stored credential — CredentialManager, Get-StoredCredential and Start-Process -Credential to run a script without typing a password.
- PowerShell: tail -f equivalent with Get-Content — Follow and filter a log file with Get-Content -Tail -Wait and Select-String.
- PowerShell: testing for null or empty strings — How $null, empty and whitespace strings behave in an if condition and with IsNullOrEmpty.