If you've ever wanted to know all IP addresses assigned to a machine, you should use WMI: Get-WMIObject win32_NetworkAdapterConfiguration |...
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 WindowsPowerShellExpandProperty rocks – sometimes
Select-Object will select the object properties that you want to see. So it removes all properties you did not specify, but it always returns an...
Creating Range of Letters
PowerShell can easily provide a range of numbers, but creating them is not that easy - unless you convert ascii codes into characters: 65..90 |...
Exclude Unwanted Registry Values
When you query the values of a registry key, PowerShell will add a bunch of artifacts to the results. You'll get some new properties that all...
Assignment Operators Can Get in Your Way
Have a look at this line – do you see what's wrong with it? Get-WMIObject Win32_UserAccount | Where-Object { $_.Name = 'Guest' } PowerShell will use...
Finding Services
You can use a keyword search with WMI to find a specific service. The next line will get you all services with the keyword "cert" in its...
Use Server-Side Queries
If you'd like to speed up things, you should try to filter server side instead of client side whenever you query information. For example, this...
Use $null to Identify Empty Data
You can use $null as a special variable representing "nothing." You can use it to identify (and sort out) non-existing data like so:...
Use Write-Progress to Return Feedback
Some operations will take more time so it is a good idea to return feedback. Write-Progress can do just that. Go ahead and add a Foreach-Object to...
Sending POST Data via PowerShell
Often, feedback or votes on Web pages are sent back via POST requests. You can send this kind of information via PowerShell as well. You should...
Connect or Disconnect Network Adapter
When you are ready to connect or disconnect a network adapter, you can utilize the Shell.Application COM object, which will give you access to...
Finding 10 Largest Files
You may need to find the largest files for possible clean-up when free space on a drive runs low. One way is to have PowerShell examine all file...
Random Tip of the Day
Get-Random has a dual purpose. It can provide you with a random number and also pick random elements from a collection. So, if you want to get a new...
Sorting Stuff
You can use Sort-Object to sort simple variable types. Have a look at the following: 'Tom', 'Chris', 'Judy', 'Alan'...
Finding Invalid Aliases
When you create new Aliases with Set-Alias, PowerShell does not check whether the target you specify is valid. Instead, this is checked only when...
IPv4 Address Lists
You should try this to get all IPv4 addresses assigned to your system: Get-WMIObject win32_NetworkAdapterConfiguration | Where-Object { $_.IPEnabled...
Getting Assigned IP Addresses
You should use this to retrieve all IP addresses assigned to your computer: Get-WMIObject win32_NetworkAdapterConfiguration | Where-Object...
Generate PC Lists
One easy way of creating lists of PC names or IP address ranges etc is a simple pipeline like this: 1..40 | Foreach-Object {...
Create HTA Files
Another way is to ConvertTo-HTML is a convenient way of converting object results in HTML. However when you open these files, your browser starts...
WMI Server Side Filtering
Whenever you use Get-WMIObject, be sure to minimize resources and maximize speed by using server-side filtering. The next line will use the slow...
List Installed Updates
Using Get-Hotfix is pretty convenient as it serves to list installed updates. Unfortunately, it is not very thorough as it doesn’t retrieve...
Downloading Files Silently in the Background
When using the additional cmdlets in the BitsTransfer module that comes with Windows 7 and Server 2008 R2, you can make downloads happen silently in...
Download Files from the Internet
Windows 7 and Server 2008 R2 come with a module called BitsTransfer, which allows you to access the background intelligent transfer service used by...
Adding New Snapins and Modules
Snapins and modules can add new cmdlets and/or providers to PowerShell. Use this if you would like to see the list of available Snapins:...
Test whether Registry Value exists
You should remember that registry values are treated like properties to a registry key so they have no specific path and you cannot use Test-Path to...
Test whether Registry Key exists
If you would like to test whether a certain registry key exists, you should remember that all registry keys are treated like folders on a drive, so...
Creating Constant Functions
In PowerShell, functions can be constant to prevent them from being deleted anymore, which is necessary if you must protect security-critical...
Adding Protection to Functions
Functions that you define are read/write and can easily be overwritten. You can set the read-only attribute to make a function read-only so that you...
Reading Default Values
Each registry key has a default value. It is called (default) when you look into regedit. To read this default value, you can just use this name...
List Installed Software
Get-ItemProperty reads registry values. You can create a software inventory in just one line since it supports wildcards: Get-ItemProperty...