To automatically print PDF documents, unfortunately you cannot use Out-Printer. Out-Printer can only send pure text documents to a printer. However,...
database-tools
Installing Linux on Windows 10
Windows 10 comes with Windows Subsystem for Linux (WSL) feature that you can use to run various Linux distributions. Launch a PowerShell with...
Microsoft announces the availability of IDERA SQL DM Performance Insights for Azure Data Studio
We are pleased to announce an updated version of IDERA SQL DM Performance Insights for Azure Data Studio. And we are excited to be announcing the...
Using Localized User and Group Names
[System.Security.Principal.SecurityIdentifier _i="0" _address="0" theme_builder_area="post_content" /][System.Security.Principal.NTAccount _i="1"...
SID of Current User
Here is a one-liner that returns the SID for the current user and can be used in logon scripts, for example:...
Precise for Sybase monitoring & performance
Precise for Sybase builds a history of activity showing resource consumers. SQL statements are correlated to stored producers, logins, and...
Scanning Ports
Here is a straightforward way to test ports on a local or remote system. You can even specify a timeout (in milliseconds): function Get-PortInfo {...
What to do when the SQL Server service does not start
The executable process that is the SQL Server Database Engine is called the Database Engine service. The Database Engine service is an executable...
Resetting Console Colors
It can be easy to mess up console colors in the PowerShell console. A single call with accidental values, or a script that messed with the colors,...
Data Proximity for Data Warehousing Performance
Data Warehousing DBAs usually work with huge tables, often possessing hundreds of millions or even billions of rows. And occasionally, these DBAs...
Solving SSL Connection Problems
Sometimes when you try to access web services (or download internet content in general), PowerShell may bail out and complain about not being able...
Deleting the Oldest Log File
Enable Real-Time Streaming with Foreach
Classic foreach loops are the fastest loop available but they come with a severe limitation. Foreach loops do not support streaming. You need to...
Back to Basics: Build a Foundation for Data Governance in 2019
Those who are watching the data management industry have definitely seen an increase in the volume of posts, whitepapers, and webinars on the topic...
Listing Network Drives
There are many ways to create a list of network drives. One involves a COM interface that was used by VBScript as well, and we’ll pick it to...
Sending Emails via Outlook
You can always use Send-MailMessage to send a mail via any SMTP server. If you’d like to use your Outlook client, though, i.e. to keep access...
Title-Casing Strings (Capital Letter Starts Each Word)
Polishing raw text is not always trivial, and when you’d like to make sure names or texts are well-formed, and each word starts with a capital...
Concatenating Text Files
Finding Windows Universal Unique Identifier (UUID)
Every Windows installation has a unique UUID that you can use to distinguish machines. While computer names can change, the UUID won’t: PS>...
Formatting Date and Time (with Culture)
In the previous tip we illustrated how Get-Date can take a format string and convert DateTime values to strings. The string conversion always uses...
Formatting Date and Time
Formatting date and time to your needs is easy with the -Format parameter provided by Get-Date. You can use it either with the current date, or...
Sending PowerShell Results to PDF (Part 4)
In the previous tip we created the function Out-PDFFile which accepts any PowerShell results and turns them into a PDF file – using the built-in...
Sending PowerShell Results to PDF (Part 3)
In the previous tip we explained how you can use PowerShell on Windows 10 and Windows Server 2016 to set up a PDF printer that prints anything to a...
Sending PowerShell Results to PDF (Part 2)
In the previous tip we illustrated how you can use the built-in “Microsoft Print to PDF” printer to send PowerShell output to PDF files. However,...