Changing Excel Cells from PowerShell

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

Changing Excel Cells from PowerShell

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

Changing Excel Cells from PowerShell

Adding New Nodes to an XML Document

Adding New Items to an XML Document Efficiently If you need to add new items to an XML document that already contains such items, the easiest way is to search for an existing item, then clone it. You can then update the information in the cloned item and insert it...

Changing Excel Cells from PowerShell

Bringing Window in the Foreground

Bringing a Process Window to the Foreground with PowerShell PowerShell can use Add-Type to access internal Windows API functions. This way, it is easy to bring any process window into the foreground. Here is the function you need: #requires -Version 2 function...

Changing Excel Cells from PowerShell

Enabling Telnet Client and Watching Star Wars

By default, the Telnet client is disabled on Windows systems. You can easily enable it with a one liner in PowerShell, though. Just launch a PowerShell with full Administrator privileges, then run this command: PS C:\> dism /online /Enable-Feature...

Changing Excel Cells from PowerShell

Enabling PowerShell Remoting with NTLM

By default, PowerShell remoting uses Kerberos authentication and works only in domain environments, and only when you specify computer names, not IP addresses. Configuring PowerShell Remoting in Peer-to-Peer Network To use PowerShell remoting in other scenarios such...

Changing Excel Cells from PowerShell

Test-Connection with Timeout

The Test-Connection cmdlet implements a simple ping to check whether a system responds to an ICMP request. Unfortunately, you cannot specify a timeout. Test-Connection defaults to a static timeout of 4 seconds: PS C:\> Test-Connection -ComputerName...

Changing Excel Cells from PowerShell

Use Get-CimInstance with DCOM

Using Get-CimInstance as an Alternative to Get-WmiObject PowerShell 3.0 added an alternative to Get-WmiObject: Get-CimInstance seems to work very similar and can retrieve information from the internal WMI service: PS C:\> Get-WmiObject -Class Win32_BIOS...

Changing Excel Cells from PowerShell

Waiting for Process Launch

PowerShell has a built-in support to wait until a process or many processes end: simply use Wait-Process. Understanding Data Marts and Dimensional Modeling There is no support to do the opposite: wait until a process has started. Here is a function that can wait for...

Changing Excel Cells from PowerShell

Try CTRL+SPACE!

Useful Keyboard Shortcuts in PowerShell ISE In the PowerShell ISE, there are two key shortcuts that can help you. Pressing TAB works just like in the console, and each time you press TAB, you get a tabexpansion result. Using CTRL+SPACE for IntelliSense in PowerShell...

Changing Excel Cells from PowerShell

Updating Your Office Phone Number in Active Directory

Updating Active Directory User Information with PowerShell If you have installed the free RSAT tools from Microsoft, you can use PowerShell to update information stored in your AD user account, for example your office phone number. Permissions for Updating Active...

Changing Excel Cells from PowerShell

Cloning Active Directory Security Settings

Whenever you add delegation rights to an AD object (i.e. allow a user to manage the members of an organizational unit), you really invoke a change of security settings for the given AD object. Cloning Active Directory Security Settings Easily AD security descriptors...

Changing Excel Cells from PowerShell

Bulk-Remove Protection for Accidental Deletion in AD

Removing Accidental Deletion Protection By default, AD objects are protected from accidental deletion. To remove this protection for all objects in a given scope (i.e. all objects in an organizational unit and below), try this code: #requires -Version 1 -Modules...

Part 1: Monitoring Analysis Services(SSAS) Performance

Part 1: Monitoring Analysis Services(SSAS) Performance

So you’re a DBA and your manager comes in and says that the BI team wants to install and configure an instance of Analysis Service. Oh and by the way, you are going to be responsible for monitoring the availability and performance of the instance as well as making...

Changing Excel Cells from PowerShell

DBA Triage Using Heatmaps

The word “triage” for me brings up images from MASH re-runs; or memories of emergency room visits with nurses quickly deciding whether you are healthyenough to sit and suffer in the lobby for a few hours. For years, triage in the database performance world meant a...

Changing Excel Cells from PowerShell

Using Green Checkmarks in Console Output

In a previous tip you have seen that the PowerShell console supports all characters available in a TrueType font. You just need to convert the character code to the type "Char". Advanced Example: Using Splatting for Console Output Here is a more advanced example that...

Changing Excel Cells from PowerShell

Using Symbols in Console Output

Did you know that console output can contain special icons like checkmarks? All you need to do is set the console to a TrueType font like "Consolas". To display special characters, use the decimal or hexadecimal character code, for example: [Char]8730 [Char]0x25BA...

Changing Excel Cells from PowerShell

Removing Whitespace (and Line Breaks)

You may know that each string object has a method called Trim() that trims away whitespace both from the beginning and end of a string: $text = ' Hello ' $text.Trim() Trim() and Line Breaks A lesser known fact is that Trim() will also eat away leading and trailing...