For example, you should use this line if you want to launch a *.ps1 PowerShell script externally from outside PowerShell via desktop shortcut or...
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 WindowsPowerShellGet All Logged On Users
In a previous tip, you learned how to determine who the user is logged onto the physical machine. However, this will not discover logged-on terminal...
Comparing Hotfixes
If you want to check hotfixes, you should compare installed hotfixes on a master image with some other machine. Go ahead and use Compare-Object and...
Backing Up Event Log Files
WMI provides a method to backup event log files as *.evt/*.evtx files. The code below creates backups of all available event logs: Get-WmiObject...
Opening Excel Reports in a New Window
When opening CSV files with Excel from PowerShell, you may receive exceptions if the particular file was opened by Excel already: Invoke-Item...
Loading .EVT/.EVTX Event Log Files
If customers send in dumped event log files, there is an easy way to open them in PowerShell and analyze content: Get-WinEvent! The -Path parameter...
Checking Loaded Formats
PowerShell Snapins and Modules can add format files that describe how Powershell should auto-format object types. Use this line to check which...
Checking Loaded Assemblies
Use this line to check which .NET assemblies are currently loaded into PowerShell: $host.Runspace.RunspaceConfiguration.Assemblies ReTweet this...
Checking -STA Mode
PowerShell needs to run in STA mode to display Windows Presentation Foundation (WPF) windows. ISE runs in STA mode by default whereas the console...
Filtering Multiple File Types
If you want to filter files based on multiple extensions, you should use this filter: filter Where-Extension { param( [String[]] $extension =...
Cleaning Transcript
When you run Start-Transcript, PowerShell will document all console input and output in a file. To remove all output and create a file with your...
Automated Authentication
You will not want a credential dialog to pop up if you need to run scripts unattended that need to authenticate using credentials. Here is an...
Get Logged On User
You can use this code to find out which user is locally logged on a machine: $computername = 'SomeMachine-or-IP'Get-WmiObject...
Finding Parameter Aliases
Sometimes, cmdlet parameters have additional alias names, but these names aren't well documented. Here is a script that will list all parameter...
Playing Sound in PowerShell
If you would like to catch a user’s attention, you can make PowerShell beep like this:...
Identifying Computer Hardware
If you must identify computer hardware, you could do so on the hard drive serial number: Get-WmiObject -Class Win32_DiskDrive | Select-Object...
Formatting a Drive
In Windows Vista and higher, there is a new WMI class called Win32_Volume that you can use to format drives. However, you should be careful when...
Sending Mails With Outlook
You can use PowerShell to automatically prepare your e-mails and send them via Outlook. The code requires that you first launch Outlook as an...
Setting Mouse Position
PowerShell can place the mouse cursor anywhere on your screen. Here's the code:...
Comparing Services
Compare-Object can help when troubleshooting computers. For example, you should try this to compare the service status on two machines and find out...
Checking Whether User or Group Exists
To find out whether a given local or domain user/group exists, you can simply use the static method Exists():...
Reading Text Files as One Chunk
In a previous tip, you learned how to quickly read in text files. The result was a string array. If you want to read the text as one large string...
Reading Text Files Fast
Let's assume you want to read a large text file. Let's create one: Get-Process | Export-CliXML $home\data.xml(Dir $home\data.xml |...
Making Your Keyboard Sound like Typewriter
PowerShell is all about typing. But if you'd like to get back the old-fashioned typewriter sound, here is a freeware tool that can bring it...
Disabling Automatic Page Files
If you would like to programmatically control page file settings, you can use WMI but must enable all privileges using -EnableAllPrivileges. The...
Eliminating Duplicate Words
Let's assume you want to eliminate duplicate words in a text. Here is how you can do this: 'this text text contains duplicate words words...
Add Whitespace after Commas
Operator replace is extremely powerful when you use back references. For example, to make sure in a text that there is a space after each comma, you...
Use Back References with -Replace
If you need to replace text with some other text and keep a reference to the original text, you can use the backreferenceback reference placeholder...
Adding Quotes in Quotes
If you need quotes to appear inside a quoted string, you should use quotes: $text = "Hello ""World"""$text =...
Running Native Commands in PowerShell
Sometimes it only takes a little tweaking to make a native command run well inside PowerShell. For example, this line runs in cmd.exe but fails in...