In the previous tip series, we developed a new function called Test-OnlineFast that can ping multiple computers in record time. For some reason, the...
ps1
Categories
- Free tools
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Inventory Manager
- SQL Query Tuner for SQL Server
- SQL Safe Backup
- SQL Secure
- SQL Workload Analysis for SQL Server
- Uptime Infrastructure Monitor Formerly Uptime
Finding Registered Event Log Source Names
When you write events to an event log using Write-EventLog, you must specify a valid source name. However, there is no easy way of finding out which...
Select-Object and -ExcludeProperty
Here is a line of code that often puzzles PowerShell users: Get-Service | Select-Object -ExcludeProperty Name When you use Select-Object, its...
Converting PowerShell to Batch
Here is a fun PowerShell function called Convert-PowerShellToBatch. Provide it with the path to a PowerShell script, or pipe in the results from...
Converting User Name to SID
If you’d need to find out the SID for a user name, here is a useful chunk of code that does the job: $domain = 'MyDomain' $username =...
Displaying Data in a Grid View Window Vertically
Out-GridView always produces a table with one object per line: Get-Process -Id $pid | Out-GridView Occasionally, it would be more helpful to display...
Finding All Domain Controllers (no module required)
In the previous tip we explained how you can use the ActiveDirectory module and its cmdlets to find all domain controllers in your organization, or...
Getting Cached Credentials
In the previous tip we talked about a public module called PSCredentialManager that helps you manage cached credentials. Sometime, less is more, so...
Installing Modules in PowerShell Core on Linux
When you’d like to install modules for all users from the PowerShellGet repository, you need Administrator privileges. On PowerShell Core on...
Parsing Distinguished Names
Distinguished names are strings, and strings contain powerful ways of parsing data. The most powerful yet simple approach is the Split() method....
Registering Default PowerShell Repository
If you use the PowerShellGet module (which ships by default on Windows 10 and Server 2016), you can easily download and install shared PowerShell...
Running PowerShell Script as a Scheduled Task
If you need to run a PowerShell script in regular intervals, why not run it as a scheduled task? Here are some lines that help you create a new...
Creating Random MAC Addresses
If you just need a bunch of randomly generated MAC addresses, and you don’t care much about whether these addresses are actually valid, then...
Converting Binary String to Integer
Here is how you convert a binary text string into the corresponding integer value: $binary = "110110110" $int =...
Turning AD User into a Hash Table
Sometimes it could be useful to load all attributes from a given AD user into a hash table. This way, you could edit them, and then use Set-ADUser...
Exporting ActiveDirectory Module
To manage users and computers in your Active Directory from PowerShell, you need the ActiveDirectory module which comes as part of the free RSAT...
Determine if Array Contains Value – Using Wildcards
If you’d like to know whether an array contains a given element, PowerShell provides the –contains operator. This operator does not...
Working with LDAP and Dates
LDAP filters are a fast and powerful way of retrieving information from Active Directory. However, LDAP filters use a very low-level date and time...
Show or Hide Windows
PowerShell can call internal Windows API functions, and in this example, we’d like to show how you can change the show state of an application...
Using Named Parameters in PowerShell Functions
When you create a PowerShell function, all parameters are positional until you start adding the “Position” attribute. Once you start to...
Modern Replacement for systeminfo.exe
For ages, systeminfo.exe returned all profiling information for a computer, and could made object-oriented in Powershell – somewhat: PS...
PowerShell Remoting and HTTP 403 Error
If you use PowerShell remoting and get “HTTP 403” errors, one of the more obscure reasons for this is a proxy that interferes with your...
Replacing Special Chars like “Umlauts”
PowerShell 2+ Sometimes it becomes necessary to replace special characters like German “Umlauts” in order to normalize user names or...
Finding AD User by SAMAccountName
PowerShell 5 The free Microsoft RSAT tools come with a full-blown ActiveDirectory module, but sometimes simple AD tasks can be mastered with just a...