MasterPowerShell's Get-ItemProperty to access, update and change a registry key - learn the syntax of HKLM: | employ set-ItemProperty - Code & Examples
PowerShell's WhatIf and confirm are two great commands for testing complicated scripts without risking the code running amok.
The PowerShell 'ForEach' loop is more complex, and has more arguments than the 'for' and 'Do While' loops. Pay close attention to the types of bracket. Also Foreach-object cmdlet.
PowerShell Basics: While Loop Do ... While, also Do ... Until. Let us see what each of the keywords 'Do', 'While' and 'Until' have to offer - Code Examples
PowerShell Basics: Get-AdUser -filter with Code Examples. Get this Active Directory cmdlet working by mastering the -filter or LDAPfilter parameter.
PowerShell -ErrorAction SilentlyContinue If a PowerShell script halts, or a portion of the code does not work, what action do you want the error to trigger? One popular solution is to tell the script to silently continue. Windows PowerShell -ErrorAction SilentlyContinue -ErrorAction Example: Check If a Service Has Been Installed …
Introduction to PowerShell Scripting -Recurse When you want a PowerShell command to search sub-directories -Recurse is a life saver. In other contexts this concept is called iteration, or sub-directory recursion. The cmdlet which benefits most from the -Recurse parameter is Get-Childitem. Topics for PowerShell -Recurse Parameter Example 1 Get-ChildItem -Recurse …
How to Create a PowerShell Function Firstly, let us think about our approach to PowerShell’s functions. Are they a tool to be used occasionally for recurring blocks of code? Alternatively, will functions become the central methodology for every script we create? To elaborate on what I mean, let us consider …
PowerShell Basics: Remote shutdown cmdlet Stop-Computer. Easily shutdown a remote server, also learn how to Restart-Computer, plus known issues.
PowerShell's invoke-Command is ideal for running a quick command on a remote computer. with -computerName, -scriptBlock and -filePath | Code Examples