Most cmdlets these days are organized in modules. Modules were introduced in PowerShell 2.0. Their main advantage is copy&paste deployment (no...
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 WindowsPowerShellLoading PowerShell Modules
All cmdlets live in modules or snap-ins. To see which modules are currently loaded, use Get-Module. In PowerShell 3.0 or better, most modules are...
How to find Commands that have the Specified Parameter
Get-Command is your primary tool when you need to find a command to accomplish something. You can search for verbs and/or nouns like this: # find...
Get CPU Cores and Processor Information
WMI can find out details about your CPUs in just one line: PS> Get-WmiObject -Class Win32_Processor | Select-Object -Property Name, Number* Name...
Installing Windows Features
On servers, PowerShell can install Windows features with the cmdlet Install-WindowsFeature. When you save the result emitted by...
Create Dynamic Script Blocks
Script blocks are pieces of executable PowerShell code. You typically create them by enclosing code in braces. To dynamically create script blocks...
Manage NTFS Permission Inheritance
By default, folders and files inherit permissions from their parents. To stop inheritance and make sure only the explicitly assigned permissions are...
Removing Explicit NTFS Permissions
In previous examples, we showed you how you can add new NTFS permissions to an existing folder. If you want to reset permissions and make sure all...
Getting Explicit NTFS Permissions
To find out which NTFS access permissions have been assigned directly to a file or folder, check for the property "isInherited". This will...
Managing NTFS Permissions
In a previous tip we showed how you can add NTFS permission rules to a folder. To find out what kind of permissions are assignable, take a look at...
Create Folder with NTFS Permissions
Often, you may need to create a new folder and also set NTFS permissions for the folder. Here is a simple example that creates a new folder and...
Splitting Long Lines
To improve readability, you can break PowerShell lines into separate lines. Get-Service | Where-Object { $_.Status -eq 'Running' }...
Prompting for Function Parameters
With a simple trick, you can add a dialog window that helps users to provide the function parameters for your function. Simply use...
Using PowerShell’s Help Window for General Output
To display text information, you can of course launch notepad.exe, and use the editor to display the text. Displaying text in an editor is not such...
Playing Sound in the Background
If your script takes some time to complete, you may want to play a system sound file. Here is a sample illustrating how this can be done: # find...
Finding Executable
Many file extensions are associated with executables. You can then use Invoke-Item to open a document with this executable. Finding out just which...
Splitting Text at Uppercase Letters
To split a text at each uppercase letter, without having to provide a list of uppercase characters, try this example: $text =...
Finding Uppercase Characters
If you'd like to find uppercase characters, you could use regular expressions. However, you would then provide a list of uppercase characters to...
Using Green Checkmarks in Console Output
In a previous tip you have seen that the PowerShell console supports all characters available in a TrueType font. You just need to convert the...
Using Symbols in Console Output
Did you know that console output can contain special icons like checkmarks? All you need to do is set the console to a TrueType font like...
Test Nested Depth
When you call a function, PowerShell increases the nest level. When a function calls another function, or script, this will again increase the nest...
Aborting Pipeline
Sometimes you might want to abort a pipeline when a certain condition is met. Here is a creative way of doing this. It works all the way back to...
"Continue" and Labels
When you use the "Continue" statement inside a loop, you can skip the remainder of this loop iteration, and continue with the next....
Get Memory Consumption
To get a rough understanding how much memory a script takes, or how much memory PowerShell puts aside when you store results in a variable, here is...
Use Closures to Lock Variables to Script Blocks
When you use variables inside a script block, the variables are evaluated when you run the script block. To lock variable content, you can create a...
Mutually Exclusive Parameters (Part 2)
Mutually exclusive parameters in PowerShell functions use the "ParameterSetName" attribute to assign parameters to different parameter...
Mutual Exclusive Parameters
Sometimes, PowerShell functions have parameters that should be mutually exclusive: the user should only be able to use either one, not both. To...
Parsing PowerShell Scripts
If you'd like to create your own color-coded PowerShell scripts, for example formatting them in HTML, here is a sample that gets you started....
Aborting the Pipeline
If you know beforehand how many results you expect from a pipeline, you can use Select-Object to stop the upstream cmdlets. This can save a lot of...
Passing Arrays to Pipeline
If a function returns more than one value, PowerShell wraps them in an array. However, if you pass the results to another function inside a...