Concept: A list of PowerShell Tips.


PowerShell Tip #1: Rename tabs in Powershell ISE

PowerShell Tip #2: Convert Datetime <> String

PowerShell Tip #3: Change default parameter values

PowerShell Tip #4: Difference between Break and Continue

PowerShell Tip #5: Automatic variable ($PSBoundParameters)

PowerShell Tip #6: Create an infinite loop

PowerShell Tip #7: Convert WMI date to Datetime

PowerShell Tip #8: OutVariable parameter

PowerShell Tip #9: Open file in a new tab in Powershell ISE

PowerShell Tip #10: List the common parameters

PowerShell Tip #11: Get the definition of a function

PowerShell Tip #12: Useful commands about Powershell profile

PowerShell Tip #13: Prevent PowerShell from exiting once script finished

PowerShell Tip #14: List, add and remove network drives

PowerShell Tip #15: Use a BrowseFolder dialog for user input

PowerShell Tip #16: Unix tail equivalent command (to monitor a file)

PowerShell Tip #17: Get-Module with specific version

PowerShell Tip #18: List RODC (Read-Only Domain Controllers)

PowerShell Tip #19: List FSMO roles

PowerShell Tip #20: Switch from Server GUI to Server Core

PowerShell Tip #21: Import specific cmdlets from a module

PowerShell Tip #22: Find GC (Global Catalog)

PowerShell Tip #23: Get Tombstone Lifetime

PowerShell Tip #24: List loaded and installed modules

PowerShell Tip #25: Reload a profile

PowerShell Tip #26: List the available commands from a module

PowerShell Tip #27: Display the help for the parameters of a cmdlet

PowerShell Tip #28: Get last boot up time

PowerShell Tip #29: Get type accelerators

PowerShell Tip #30: Find system uptime

PowerShell Tip #31: Reload a module

PowerShell Tip #32: Count the number of parameters passed in a function

PowerShell Tip #33: Increase the number of commands of the history

PowerShell Tip #34: List parameter aliases for a cmdlet

PowerShell Tip #35: List and remove a function

PowerShell Tip #36: Create a temporary file

PowerShell Tip #38: Find the user password expiration date

PowerShell Tip #39: Easier way to define parameter attributes

PowerShell Tip #40: Restart print spooler service

PowerShell Tip #41: DefaultParameterSetName of the CmdletBinding attribute

PowerShell Tip #42: Find the owner of a process

PowerShell Tip #43: Provide bug reports

PowerShell Tip #44: Check, Set and Remove ReadOnly attribute of a file

PowerShell Tip #45: Open a PowerShell console since PowerShell ISE

PowerShell Tip #46: Return the qualifier of a path

PowerShell Tip #47: Sends output to a printer

PowerShell Tip #48: Open the help in a graphical window

PowerShell Tip #49: Compare two sets of objects

PowerShell Tip #50: Difference between Write-Error and throw

PowerShell Tip #51: Avoid command name conflicts in a session

PowerShell Tip #52: Count the number of lines of a file

PowerShell Tip #53: Run PowerShell as SYSTEM (NT AUTHORITY\SYSTEM)

PowerShell Tip #54: Identify mandatory parameters

PowerShell Tip #55: Determine if using 32-bit or 64-bit version of Windows

PowerShell Tip #56: Convert Decimal <> Hexadecimal

PowerShell Tip #57: Restoring a user from AD Recycle Bin with PowerShell

PowerShell Tip #58: Find Active Directory Schema Version

PowerShell Tip #59: Find Microsoft Exchange Schema Version

PowerShell Tip #60: Check integrity and defragment offline the Active Directory database (NTDS.DIT)

PowerShell Tip #61: Rename a computer

PowerShell Tip #62: Concatenate arrays

PowerShell Tip #63: Check if a computer is member of a domain or workgroup

PowerShell Tip #64: Enable or Disable the Windows Firewall

Powershell Tip #65: Get the forest and domain functional levels

Powershell Tip #66: Backup system state with Windows Server 2012

Powershell Tip #67: Add a domain controller to an existing domain

Powershell Tip #68: Transfering or Seizing FSMO roles

Powershell Tip #69: Enable or Disable a Global Catalog

Powershell Tip #70: Raise the forest and domain functional levels

Powershell Tip #71: List the dependent services

Powershell Tip #72: List the nested groups of a user in Active Directory

Powershell Tip #73: Display percentage estimated charge remaining of a laptop

Powershell Tip #74: Empty the recycle bin

Powershell Tip #75: List only hidden files in a folder

Powershell Tip #76: Force a user to change password

Powershell Tip #77: List users with “Store passwords using reversible encryption” enabled

Powershell Tip #78: Find the Windows installation date

Powershell Tip #79: Search a user located in another domain

Powershell Tip #80: Find MAC address on a remote computer

Powershell Tip #81: Count files and folders

Powershell Tip #82: List the order of network protocol bindings

Powershell Tip #83: Clear/Empty the content of a file

Powershell Tip #84: Retrieve a random name from a file

Powershell Tip #85: Run an infinite / endless / continuous ping

Powershell Tip #86: List Security Filtering of a GPO

Powershell Tip #87: Set keyboard layout

Powershell Tip #88: List all IP Addresses for a computer

Powershell Tip #89: List shares on local and remote computer

Powershell Tip #90: Troubleshooting Event 4740 Lockout with Caller Computer Name blank / empty

Powershell Tip #91: List optional and mandatory properties of the user class

Powershell Tip #92: Rename the prefix of files using Insert method

Powershell Tip #93: Use the “2 in 1” cmdlet Tee-Object

Powershell Tip #94: Delete files and folder longer than 259 characters

Powershell Tip #95: Find the Geolocation of an IP Address

Powershell Tip #96: Clear all event logs

Powershell Tip #97: Change size of event logs

Powershell Tip #98: Multiply strings

Powershell Tip #99: Verify Active Directory Recycle Bin status (enabled / disabled)

Powershell Tip #100: Configure the netlogon.log size

Powershell Tip #101: Run a command from the history

Powershell Tip #102: Get the first and last day of the month

Powershell Tip #103: Get current time UTC

Powershell Tip #104: Display Message Box

Powershell Tip #105: Clear Console Pane

Powershell Tip #106: Create, (re)start, stop and reset a stopwatch

Powershell Tip #107: Bulk rename files to title case

Powershell Tip #108: Bulk change/rename extensions of files

Powershell Tip #109: Bulk get the filename without extension

Powershell Tip #110: Replace multiple spaces by one comma

Powershell Tip #111: Get names and values of Enum

Powershell Tip #112: Get int values from Enum

Powershell Tip #113: How to install PowerShell on Linux (Ubuntu 16.04)

Powershell Tip #114: Rename a folder using Move method

Powershell Tip #115: Create a bunch of files

Powershell Tip #116: Remove empty elements from an array

Powershell Tip #117: Remove whitespaces from a string

Powershell Tip #118: Test if path is a file or a folder using Test-Path cmdlet

Powershell Tip #119: Increase the number of lines sent to pipeline with Get-Content

Powershell Tip #120: List the headers of a CSV file

Powershell Tip #121: Get total RAM installed

Powershell Tip #122: Get the start time and end time of the current day

Powershell Tip #123: Extract the CN (Common Name) from DN (Distinguished Name) in Active Directory

Powershell Tip #124: Extract the OU (Organizational Unit) from DN (Distinguished Name) in Active Directory

Powershell Tip #125: Identify the duplicates headers of a CSV file

Powershell Tip #126: Convert days, hours, minutes, seconds with New-TimeSpan

Powershell Tip #127: Wait for EMC Avamar Backup to be completed

Powershell Tip #128: Parameter -NoElement from Group-Object cmdlet

Powershell Tip #129: Get midnight time

Powershell Tip #130: Convert ticks <> datetime

Leave a Reply

Your email address will not be published. Required fields are marked *