Type accelerators are shortcut names that represent .NET types. For example, you can use [XML] instead of [System.Xml.XmlDocument]. By default,...
posts-powershell
Categories
- Free tools
- SQL Admin Toolset
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Doctor
- SQL Enterprise Job Manager
- 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
Tags
Administration agent-based monitoring Agentless Monitoring alert responses alert thresholds alerting Alerts Amazon Aurora Amazon EC2 Amazon RDS Amazon RDS / Aurora Amazon RDS for SQL Server Amazon Redshift Amazon S3 Amazon Web Services (AWS) Analytics application monitoring Aqua Data Studio automation availability Azure Azure SQL Database azure sql managed instance Azure VM backup Backup and recovery backup and restore backup compression backup status Backup Strategy backups big data Blocking bug fixes business architecture business data objects business intelligence business process modeling business process models capacity planning change management cloud cloud database cloud database monitoring cloud infrastructure cloud migration cloud providers Cloud Readiness Cloud Services cloud storage cloud virtual machine cloud VM clusters code completion collaboration compliance compliance audit compliance audits compliance manager compliance reporting conference configuration connect to database cpu Cross Platform custom counters Custom Views customer survey customer testimonials Dark Theme dashboards data analysis Data Analytics data architect data architecture data breaches Data Collector data governance data lakes data lineage data management data model data modeler data modeling data models data privacy data protection data security data security measures data sources data visualization data warehouse database database administration database administrator database automation database backup database backups database capacity database changes database community database connection database design database developer database developers database development database diversity Database Engine Tuning Advisor database fragmentation database GUI database IDE database indexes database inventory management database locks database management database migration database monitoring database navigation database optimization database performance Database Permissions database platforms database profiling database queries database recovery database replication database restore database schema database security database support database synchronization database tools database transactions database tuning database-as-a-service databases DB Change Manager DB Optimizer DB PowerStudio DB2 DBA DBaaS DBArtisan dBase DBMS DDL Debugging defragmentation Demo diagnostic manager diagnostics dimensional modeling disaster recovery Download drills embedded database Encryption End-user Experience entity-relationship model ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events execution plans free tools galera cluster GDPR Getting Started Git GitHub Google Cloud Hadoop Healthcare high availability HIPAA Hive hybrid clouds Hyper-V IDERA IDERA ACE Index Analyzer index optimization infrastructure as a service (IaaS) infrastructure monitoring installation Integrated Development Environment interbase Inventory Manager IT infrastructure Java JD Edwards JSON licensing load test load testing logical data model macOS macros managed cloud database managed cloud databases MariaDB memory memorystorage memoryusage metadata metric baselines metric thresholds Microsoft Azure Microsoft Azure SQL Database Microsoft PowerShell Microsoft SQL Server Microsoft Windows MongoDB monitoring Monitoring Tools Monyog multiple platforms MySQL news newsletter NoSQL Notifications odbc optimization Oracle PeopleSoft performance Performance Dashboards performance metrics performance monitoring performance schema performance tuning personally identifiable information physical data model Platform platform as a service (PaaS) PostgreSQL Precise Precise for Databases Precise for Oracle Precise for SQL Server Precise Management Database (PMDB) product updates Project Migration public clouds Query Analyzer query builder query monitor query optimization query performance Query Store query tool query tuning query-level waits Rapid SQL rdbms real time monitoring Real User Monitoring recovery regulations relational databases Releases Reporting Reports repository Restore reverse engineering Roadmap sample SAP Scalability Security Policy Security Practices server monitoring Server performance server-level waits Service Level Agreement SkySQL slow query SNMP snowflake source control SQL SQL Admin Toolset SQL CM SQL code SQL coding SQL Compliance Manager SQL Defrag Manager sql development SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Diagnostic Manager Pro SQL DM SQL Doctor SQL Enterprise Job Manager SQl IM SQL Inventory Manager SQL Management Suite SQL Monitoring SQL Performance SQL Quality SQL query SQL Query Tuner SQL Safe Backup SQL script SQL Secure SQL Security Suite SQL Server sql server alert SQL Server Migration SQL Server Performance SQL Server Recommendations SQL Server Security SQL statement history SQL tuning SQL Virtual Database sqlmemory sqlserver SQLyog Storage Storage Performance structured data Subversion Support tempdb tempdb data temporal data Tips and Tricks troubleshooting universal data models universal mapping unstructured data Uptime Infrastructure Monitor user experience user permissions Virtual Machine (VM) web services webinar What-if analysis WindowsPowerShellRename PowerShell Scripts
Rename-Item can easily batch-rename large numbers of files, simply by piping file objects into it. Here is a sample that finds all PowerShell script...
Verifying Restore Points
When you create a new restore point with Checkpoint-Computer, you do not get back any feedback telling you whether the operation succeeded....
Enabling and Disabling Computer Restore
In a previous tip we shared how you can use PowerShell to create restore points and restore your system state in case something went bad. There are...
Backing Up System State
Let's assume your script needs to change a bunch of system settings. The worst thing that could happen is if your script breaks in the middle of...
Discarding Unwanted Information
If you want to dump results from a command, there are a number of ways. While they all do the same, they have tremendous performance differences:...
Investigating USB Drive Usage
With two lines of PowerShell code, you can dump the USB storage history from your registry and check which devices were used in the past: PS>...
Installing MUI-Packs
The current PowerShell V3 Beta requires an English Windows operating system. That's bad news for anyone running Windows 7 Professional or Home...
Finding All Object Properties
By default, PowerShell only displays a limited set of object properties. To view all available properties, add the following pipeline element:...
Finding True WMI Properties
When you use Get-WmiObject to retrieve WMI objects, PowerShell adds a number of supporting properties. If you want to display only the native WMI...
Finding Current Script Paths
Here's a useful function that you can paste into your scripts. It will tell you the current location the script is executed from. function...
Creating New Scripts in ISE
Often, you first play around with PowerShell commands interactively, and then once those commands do what you want, you can copy them to your script...
Copying Command History to Clipboard
Here's a one-liner that copies all commands from your command history to the clipboard. From there, you could paste them into your favorite...
Check Out Nested Hash Tables
In our last tip we looked at nested arrays (jagged arrays) which may have been a bit confusing. Today, we look at nested hash tables. They may look...
Jagged Arrays
This may not be for everyone: have a look at how you can create "jagged arrays". Here's a jagged array which really is a nested array:...
Making netstat.exe Object-Oriented
Netstat.exe is a useful tool, like many other console-based applications. Take a look how relatively easy it is for PowerShell to take the...
Finding Built-In Administrators Group
Using System User or group names like 'Administrators' in scripts may not always be a good idea because they are localized and may not work...
Using Advanced Breakpoints
PowerShell supports dynamic breakpoints. They trigger when certain requirements are met. Like regular breakpoints, they all require that your script...
Matching Stars
Asterisk serve as a wildcard, so how would you check for the presence of an asterisk? In a previous tip we used regular expressions for this, but...
Debugging PowerShell Scripts
In PowerShell ISE, there are little-known built-in debugging features. Provided you have saved your script to a file, you can press F9 to set...
Stopping Services Remotely
Stop-Service cannot stop services remotely. One easy way of doing so is Set-Service: Set-Service -Name Spooler -Status "Stopped"...
Easier ForEach/Where-Object in PSv3
In the upcoming PowerShell v3 which you can already download as a Beta version, using Where-Object and ForEach-Object becomes a lot simpler. No...
Lunch Time Alert
Here's a fun prompt function that turns your input prompt into a short prompt and displays the current path in your PowerShell window title bar....
Finding Files Owned by a User
Here's a simple filter that will show only those files and folders that a specific user is owner of: filter Get-Owner...
Am I Privileged?
There are numerous ways to find out if a script runs elevated. Here's a pretty simple approach: PS> (whoami /all | Select-String...
Checking User Privileges
whoami.exe is a useful little tool that ships with Windows 7/Server 2008 R2, and it becomes even more useful when you instruct it to output its...
Resolving Paths
Paths can be relative, such as ". \file.txt". To resolve such a path and display its full path, you could use Resolve-Path: PS>...
Synchronizing Current Folder
PowerShell allows its own current path to differ from what Windows thinks is the current path: [IO.Path]::GetFullPath('.') cd $env:windir...
Check PowerShell Speed
To find out how much time a particular cmdlet or command takes, here's a handy little stopwatch that you can use: function Test { $codetext =...
Running a Script Block with Parameters
Maybe you want to design a script that takes code as user input. How would you run that submitted piece of code and pass parameters to it? To run a...