Unlocking an AD account with PowerShell
PowerShell has a module that will allow you to unlock an AD user. The AD PowerShell module has number of commands for managing…
Read MoreAll things PowerShell (includes v2, v3 and v4)
PowerShell has a module that will allow you to unlock an AD user. The AD PowerShell module has number of commands for managing…
Read MoreYou can validate the status of log-shipping to a secondary server if you suspect it has been broken. Below is the script, which…
Read MoreHere is an example of using Measure-Command to gather the execution time for loading the SQL Error log into a Out-GridView object:
1 2 3 4 5 |
# First, lets get the SQL Server object... $sqlServer = gi "SQLSERVER:\SQL\MySqlServer\Default" # That's all we needed to do. Let's get error log for any entries after the date listed and return to the Out-GridView object, and then output the measurement to the console. Measure-Command {$sqlServer.ReadErrorLog() | ? LogDate -gt '11/24/2014' | Out-GridView} | Out-Host |
…
Read MoreChanging the new script header template The path to the new script template is located on this path in Windows:
1 |
C:\ProgramData\SAPIEN\PowerShell Studio 2014\Templates\FileTypes\PowerShellStudio Template.ps1 |
Change, or…
Read MoreWe can get the values of a ENV environment setting this way. Follow the PowerShell commands in the window below: Here is a…
Read MoreThis little -parameter is useful when you have PowerShell output that is delimited with a character. Below is an example using the Env…
Read MoreWe will post all miscellaneous PowerShell scripts, notes, tips and help on this page. For notes from specific books, please look at the…
Read More