Sometimes, date and time information may not conform to standards, and still you'd like to interpret that information correctly as date and...
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 WindowsPowerShellParsing Date and Time
Parsing a date and/or time information is tricky because formatting depends on the regional settings. This is why PowerShell can convert date and...
Comparing Services in PowerShell
Compare-Object is one of the most widely ignored most powerful cmdlet around. It can compare results and figure out differences. For example, if...
Map Network Drive
Sure you can use the command net use to map a network drive. But this would not check for existing mapped drives. Here's a small function that...
Getting Windows Product Key
Ever wanted to read out the Windows license key? In the Windows Registry, this key is present, but it is stored as a digital ID. To convert it back...
Mapping Printers Part 2
In a previous tip we explained how you can install and map printers remotely using a low level command: rundll32 printui.dll,PrintUIEntry /in /n...
Using "Elevator Music" In Your Scripts
Maybe you'd like to give some feedback to the users of your script while it processes a long-running task. One of the easiest (and most...
Sharing Folders
Console commands are first class PowerShell citizens, so sometimes it may be easier to use classic console commands to solve a problem. Here is a...
Executing PowerShell on Computer Lock
PowerShell can respond to system events such as locking or unlocking a session. Here is a fun sample. Provided you have your sound card turned on,...
Sending Email to Multiple Recipients
Send-MailMessage can send emails to multiple recipients. You just need to make sure the list of recipients is provided as an array. When you call...
Adding Progress to Long-Running Cmdlets
Sometimes cmdlets take some time, and unless they emit data, the user gets no feedback. Here are three examples for calls that take a long time...
Killing Long-Running Scripts
You can use a background thread to monitor how long a script is running, and then kill that script if it takes too long. You can even write to an...
Listing Processes and Process Ownership
Get-Process can list processes but does not provide information about who is running the process. Here, WMI can help. Get-ProcessEx is a clever...
Creating Scheduled Tasks From XML
In a previous tip, we showed how you can export a scheduled task to an XML file. Now, it's time to see how you can re-import that XML file to...
Output Scheduled Tasks to XML
Here's an easy way how you can export and dump a task that you created in "Scheduled Tasks" to XML: function Export-ScheduledTask {...
Use Internet Connection with Default Proxy
If you want PowerShell to use the same proxy settings that are set in your Internet Explorer browser, then here's the code you need: $proxy =...
Converting Bitmaps to Icons
If you need a new icon and have no icon editor at hand, then you can take a bitmap file (create one with MS Paint if you must) and have PowerShell...
Finding Numbers in Text
Regular Expressions are a great help in identifying and extracting data from text. Here's an example that finds and extracts a number that ends...
Verbose Driver Information
In a previous tip you discovered driverquery.exe to list driver information. This tool sports a /V switch for even more verbose information....
Making Names Unique
To make a list of items or names unique, you could use grouping and then, when a group has more than one item, append a numbered suffix to these...
Home-Made Driver Query Tool
Some months ago we introduced to you the driverquery.exe tool and how to convert its output to PowerShell objects. Here's now an amazing...
Checking Text Ending with Wildcards
In a previous tip you learned how to use the string method EndsWith() to check whether a text ends with certain characters. This method does not...
Checking if a Text Ends with Certain Characters
You can always use the String method EndsWith(). Just make sure you convert the text to lower-case first to avoid case-sensitive comparison. This...
Counting Log Activity Based On Product Install
In a previous tip you learned how to use Group-Object to analyze text-based log files. Here's a refined snippet. It will count on which days...
Counting Log Activity
Did you know that Group-Object can analyze text-based log files for you? Here's sample code that tells you how many log entries on a given day a...
Shrinking Paths
Many file-related .NET Framework methods fail when the overall path length exceeds a certain length. Use low-level methods to convert lengthy paths...
Output to Console AND Variable
To assign results to a variable and at the same time view these results in your console, place the assignment operation into parenthesis: ($result =...
Converting to Signed Using Casting
In a previous tip, you learned how to use the Bitconverter type to convert hexadecimals to signed integers. Here is another way that uses type...
Converting to Signed
If you convert a hex number to a decimal, the result may not be what you want: PS> 0xFFFF 65535 PowerShell converts it to an unsigned number...
Getting Timezones
Here's a low level call that returns all time zones: PS> [System.TimeZoneInfo]::GetSystemTimeZones() Id : Dateline Standard Time DisplayName...