ER/Studio Repository Setup & Ports – Part 1: SQL Server

Registering Default PowerShell Repository

Using PowerShellGet to Install Scripts and Modules If you use the PowerShellGet module (which ships by default on Windows 10 and Server 2016), you can easily download and install shared PowerShell scripts and modules: PS> Find-Module -Tag Security Version Name...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Logical to Physical Data Modeling

In the last article we learned how to create a data model from scratch using ER/Studio Data Architect. In part II we will explore about how to convert a Logical Data Model into a Physical Data Model. See also: IDERA's Guide to the Three Types of Data Model:...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Running PowerShell Script as a Scheduled Task

Scheduling PowerShell Scripts for Automatic Execution If you need to run a PowerShell script in regular intervals, why not run it as a scheduled task? Here are some lines that help you create a new scheduled task to run a PowerShell script at 6AM: #requires -Modules...

Getting the Most from Your Software Vendor

Getting the Most from Your Software Vendor

This topic is relevant to more than just Idera and it comes from experience working for and with multiple software vendors in multiple industries.  The simple realization is that certain customers seem to know how to gain advantages beyond the purchases and...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Creating Random MAC Addresses

Randomly Generated MAC addresses If you just need a bunch of randomly generated MAC addresses, and you don’t care much about whether these addresses are actually valid, then here is a one liner: PS> (0..5 | ForEach-Object { '{0:x}{1:x}' -f (Get-Random -Minimum 0...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Converting Binary String to Integer

Convert a binary text string into integer Here is how you convert a binary text string into the corresponding integer value: $binary = "110110110" $int = [Convert]::ToInt32($binary,2) $int Going the other way is even easier: PS> [Convert]::ToString(438,2) 110110110...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Turning AD User into a Hash Table

Sometimes it could be useful to load all attributes from a given AD user into a hash table. This way, you could edit them, and then use Set-ADUser with its -Add or -Replace parameters to apply them to another user account. AD User attributes Here is how you read in...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Exporting ActiveDirectory Module

To manage users and computers in your Active Directory from PowerShell, you need the ActiveDirectory module which comes as part of the free RSAT tools from Microsoft. Using Implicit Remoting for ActiveDirectory Module Provided you are domain administrator and have...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Determine if Array Contains Value – Using Wildcards

Checking for an Element in an Array Using PowerShell If you’d like to know whether an array contains a given element, PowerShell provides the –contains operator. This operator does not support wildcards, though, so you only can check for exact matches. Using a...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Working with LDAP and Dates

LDAP filters LDAP filters are a fast and powerful way of retrieving information from Active Directory. However, LDAP filters use a very low-level date and time format. It is basically a huge integer number. Fortunately, PowerShell contains ways of converting real...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Show or Hide Windows

PowerShell can call internal Windows API functions, and in this example, we’d like to show how you can change the show state of an application window. You’ll be able to maximize, minimize, hide, or show, for example. Using PowerShell 5’s Enum Capability for Show State...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Using Named Parameters in PowerShell Functions

When you create a PowerShell function, all parameters are positional until you start adding the “Position” attribute. Once you start to do this, all parameters with no “Position” are suddenly named and must be specified. Have a look: Example of a Classic Function...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Modern Replacement for systeminfo.exe

Retrieving System Profiling Information with systeminfo.exe For ages, systeminfo.exe returned all profiling information for a computer, and could made object-oriented in Powershell – somewhat: PS C:\> $info = systeminfo.exe /FO CSV | ConvertFrom-Csv PS C:\>...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

PowerShell Remoting and HTTP 403 Error

Resolving "HTTP 403" Errors in PowerShell Remoting If you use PowerShell remoting and get “HTTP 403” errors, one of the more obscure reasons for this is a proxy that interferes with your request. Excluding the Proxy to Fix the Issue It’s easy to exclude the proxy,...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

SQL DM & ServiceNow Email Integration

Using Email Action Responses in SQL DM to Integrate with ServiceNow This document describes the procedure of using email action responses in SQL DM to provide information to ServiceNow via its email receiver and parsing functionality to appropriately set field values...

ER/Studio Repository Setup & Ports – Part 1: SQL Server

Replacing Special Chars like “Umlauts”

PowerShell 2+ Sometimes it becomes necessary to replace special characters like German “Umlauts” in order to normalize user names or email addresses. Here is a little function that illustrates how this can be done: #requires -Version 3 function...