Converting Binary String to Integer

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...

Converting Binary String to Integer

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...

Converting Binary String to Integer

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...

Converting Binary String to Integer

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...

Converting Binary String to Integer

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...

Converting Binary String to Integer

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...

Converting Binary String to Integer

How Can SQL Workload Analysis Help You?

To find the key points of how SQL Workload Analysis can help you, look for the ducks  throughout this blog post! What Is SQL Workload Analysis? It is an add-on to SQL Diagnostic Manager and a component of the IDERA Dashboard. This dashboard is the central portal for...

Converting Binary String to Integer

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...

Converting Binary String to Integer

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:\>...

Converting Binary String to Integer

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,...

Why Be Normal?

Why Be Normal?

Being normal may not seem like much fun; I wore a “Why Be Normal?” button with pride throughout college.  And I did it out of choice rather than as a piece of required flair. “People can get a cheeseburger anywhere, okay?They come to Chotchkie’s for the...

Converting Binary String to Integer

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...

Converting Binary String to Integer

5 Database Reports In SQL Server Management Tools

Built-in Database Reports in SQL Server Management Studio When connecting to a SQL Server instance in SQL Server Management Studio, there are built in reports for databases you can use for free. These RDL files or SQL Server Reporting Service reports use DMVs and DMFs...

Finding AD User by SAMAccountName

Finding AD User by SAMAccountName

PowerShell 5 The free Microsoft RSAT tools come with a full-blown ActiveDirectory module, but sometimes simple AD tasks can be mastered with just a bit of .NET code, and no dependencies to the RSAT tools. As an example, here is a function that can search users by...

Converting Binary String to Integer

Changing Excel Cells from PowerShell

Modifying a Specific Cell in an Excel Spreadsheet Using PowerShell If you need to change the content of a specific cell in an Excel spreadsheet, take a look at this sample code: $ExcelPath = 'c:\path..to..some..excel..file.xlst' $excel = New-Object -ComObject...

Converting Binary String to Integer

Cleaning Week: Deleting CBS Log File

Windows maintains a log file named cbs.log in $env:windir\logs\cbs. It logs various pieces of information related to the Windows trusted installer, for example the installation of windows updates, and can grow massively in size. How Windows Handles Large CBS Log Files...

Why use a Date Dimension Table in a Data Warehouse

Why use a Date Dimension Table in a Data Warehouse

In the Data Mart, or the Data Warehouse world, there is a date dimension table in all schemas if you are using the Kimball Dimensional Modeling method. In the beginning of Dimensional Modeling, it was called a Time dimension. Since then, the Time dimension has...

1 9 10 11 12 13 16