Quantcast
Channel: Greg – code.commongroove.com
Browsing all 30 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Visualize Folder Structure With Ye Olde DOS Tree Command

A couple of weeks ago, I found myself looking for a way to quickly demonstrate and visualize the folder structure of a QA system. Using the ancient DOS command “tree”, I was able to make it happen...

View Article



Image may be NSFW.
Clik here to view.

Avoid Mixed Content Warnings Using Protocol Relative URLs

“This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage.” Undoubtedly, you have seen this message while...

View Article

IT Toolbox: TechNet Magazine April 2013

The April IT Toolbox column is up on the TechNet Magazine website. In April, I covered these three products: Loggly: Logging as a service Start8: Revive the Windows Start Menu on Windows 8 SQL...

View Article

IT Toolbox: TechNet Magazine May 2013

The May IT Toolbox column is up on the TechNet Magazine website. In May, I covered these products: LogicMonitor: Server and Application Monitoring as a Service Spiceworks: Free inventory, auditing,...

View Article

T-SQL: Rebuild or Reorganize Indexes for All Tables in a Database

Using the handy-dandy hidden Microsoft goodie “sp_msForEachTable”, you can easily rebuild all indexes on all tables in a user database with a one line command. Here’s how: -- To rebuild with the...

View Article


Using findstr.exe to Parse Text Files – Simple “grep” for Windows

The DOS command findstr.exe can help you …find strings… in text files. In conjunction with a for loop and tokenization, you can perform actions on the match results. For example, the following command...

View Article

IT Toolbox: TechNet Magazine June 2013

The June IT Toolbox column is up on the TechNet Magazine website. In June, I covered these products: LogMeIn Pro: Secure remote access to both Macs and PCs over the Web SniffPass Version 1.13: Sniff...

View Article

T-SQL: Get Row Counts For Every Table In A Database

Here’s a quick way to get table row counts for all tables in a database using dynamic SQL, the built-in INFORMATION_SCHEMA.TABLES view, and the “magic” of “XML PATH(”)”: DECLARE @TABLES TABLE...

View Article


.NET Calling Web Services: Look Out For The...

If you have an application making web service calls in parallel, you will want to change the maxconnection setting. By default, you will be limited to 2 concurrent connections per endpoint, so even you...

View Article


T-SQL: Disable Constraint Checks On All Tables With A Single Line Query

Microsoft’s “undocumented” but quite useful stored procedure, sp_msforeachtable, you can easily disable constraint checks on all tables in a database. Here’s how: EXEC sp_msforeachtable "ALTER TABLE ?...

View Article

T-SQL: Trailing Spaces And String Comparison

Here’s a useful tidbit regarding trailing spaces and SQL Server queries. Note the count of the results from the query below. Because SQL Server follows the ANSI/ISO SQL-92 specification, the string...

View Article

Assign a Drive Letter from the Command Line Using DiskPart

Here’s how you can assign a drive letter to a volume using the command line tool DiskPart. For more information, see this TechNet article. diskpart list volume select volume n assign letter F Hope this...

View Article

Azure: Run Windows Custom Script Extension with VM Credentials

By default, the Windows Custom Script Extension in Azure will run as Local System. Here’s how you can pass your VM credentials from your Azure Resource Manager (ARM) template to the custom script...

View Article


PowerShell DSC: Get Product IDs of Installed Products

The PowerShell DSC Package resource requires a ProductId and the exact product name. If you aren’t sure what product id or product name associated with the software you wish to install, you can try...

View Article

T-SQL: View and Set SQL Server Maximum Memory Usage

Here’s how you can use T-SQL to set the maximum memory to use. In this example, if the server has more than 4GB of RAM, it reduces SQL Server’s usage by 1GB; if it has less than 4GB, it reduces by...

View Article


PowerShell: Parse all Text Files in a Directory for a String Pattern

Here’s a snippet of PowerShell that goes through all files in a directory looking for a string. Those files that match the string pattern are then moved to another directory. Set-Location C:\somewhere...

View Article

PowerShell: Generate a Pseudo-Random String

Here’s a quick way to generate a pseudo-random string with PowerShell: $Length = 20 $AllowedCharacters = "abcdefghijklmnopqrstuvwxyz0123456789".ToCharArray() $MyRandomString = -join (Get-Random -Count...

View Article


PowerShell: Read Secure String and Convert Back to Plain Text

Here’s a quick way to read in a secure string and then convert it back to plain text: $SecureString = Read-Host -Prompt "What is the secret?" -AsSecureString $ClearTextString =...

View Article

Azure PowerShell: Copy All Files in Blob Storage to Local Directory

Here’s a Azure PowerShell script that downloads all blobs in a storage container to your local disk:   $storageAccountName = "mysuperstorage" $containerName = 'my-blobs' $destinationFolder =...

View Article

T-SQL: Find Out Who Has Locks In Your Databases

Here are a couple of ways to see who is locking up your SQL Server database. First, the undocumented system stored procedure sp_who2 gives you a few more columns than the documented sp_who. And second,...

View Article
Browsing all 30 articles
Browse latest View live




Latest Images