If you need to find helper files that are stored in the same folder, you may want to know where a given script is stored. The automatic variable...
database-tools
Finding the Current User
Should you try and use PowerShell as a log-on script, you may want to know who is actually running the script to access user specific folders or...
Outputting Calculated Properties
Format-Table is a very convenient cmdlet to output data as table. You can pick the object properties you want to output like this: Dir |...
Finding Old Files
Occasionally, you might want to find files that are older than a give number of days to delete or backup those. A simple filter can provide that...
Working with Arrays
Creating arrays in PowerShell is easy using the comma delimiter. The next line creates an array with five elements: $myArray = 'Hello', 12,...
Converting Results into Arrays
Whenever you call a function or cmdlet, PowerShell uses a built-in mechanism to handle results: If no results are returned, PowerShell returns...
Finding Duplicate Files
Hash Tables are a great way to find duplicates. Simply use the Hash Table as lookup to see if the file (or element) was already added to the Hash...
MONyog 2.9 beta 1 Has Been Released
Features: * This release adds a 'basetime' setting in MONyog. This setting (if defined by user) will be used for calculation of uptime-base...
Converting Hash Tables to Objects
Hash Tables are convenient but are not true objects. This is bad because you are unable to output the hash content to formatting cmdlets or export...
Sorting Hash Tables
Hash Tables store key-value pairs, and you normally cannot sort its content. Let's define a Hash Table first to examine this: $hash =...
Using Hash Tables
Hash Tables are a great way to organize data. A hash table stores key-value-pairs. To create a new hash table variable, try this: $person = @{} You...
Strongly Typed Variables
Unless you override how PowerShell stores variable content, you may find that PowerShell does not automatically pick the best type. For example,...
Permanent Changes to Environment Variables
You can easily manage environment variables with the predefined env: drive. For example, to add a new environment variable, type this: $env:launched...
MONyog 2.83 Has Been Released
Bug fixes: * SFTP log downloads used excessive memory on Linux. * Version 2.82 introduced a unresolved dependency with a libcrypt library on some...
Making Variables Constant
If you need to write more robust scripts, it makes sense to write-protect certain variables. Whenever you want a variable to set its content as...
Add Descriptions to Variables
Keeping track of a variable’s purpose can be accomplished by assigning a clear text description: $ip = '10.10.10.10' Set-Variable ip...
Assigning Variables
With PowerShell, you can assign values to multiple variables. For example, to initialize three variables to the same default value, use this: $a =...
Monyog 2.81 Has Been Released
Bug fix: * Fixed an issue where data collection would continue to fail with 'database locked' error message in the MONyog.log. We now roll...
Monyog 2.8 Has Been Released
Dashboard view of the Top 5 tables being used by this blog. Current release of MONyog shows the disk usage even at table level. Changes (as compared...
Monyog 2.8 beta 1 Has Been Released
Features: * Added new monitoring module displaying disk usage information for databases and tables. * Display of slow log data in Log Analyser had...
Monyog 2.72 Has Been Released
Bug fixes: * On 64 bit Linux systems running MONyog 64 bit builds queries could be considered identical by Log Analyzer even if they were not. *...
Monyog 2.71 has been released
Bug fix: * Fixed some issues with JSON strings that could prevent objects in the MONyog browser interface to populate with data. Most important...
Monyog 2.7 Has Been Released
Features: * CPU optimisations in both MONyog (server) process (in particular when 'Monitors/Advisors' page was being viewed) and browser...
Monyog 2.6 Has Been Released
Changes (as compared to 2.51) include: Features: * Log Analyzer code has been completely refactored resulting in better performance and stability...