# six demon bag

Wind, fire, all that kind of thing!

2015-12-31

## Barracuda Backup Agent for Linux Unattended Installation

Barracuda Networks provide agents for their backup appliance for various operating systems. Unfortunately the Linux agent (unlike the Windows agent) does not come with an option for a silent installation, and it doesn't look like the vendor can be bothered to do anything about it.

Instead of being able specify a path on the commandline (or at least force a silent installaton to the default path) you're always prompted for the path where the agent should be installed:

/tmp # tar xzf barracuda_backup_agent-x.x.x.tar.gz
/tmp # cd barracuda_backup_agent-x.x.x
/tmp/barracuda_backup_agent-x.x.x # ./install
Please choose an installation path, or press enter for default.
[/usr/local/barracuda/bbs]: _

See more ...

2015-12-30

## Save and Restore a DataTable

If you have a DataTable object in PowerShell and you want to persist that object as a file (and restore it back to a DataTable object sometime later) the naïve approach would be to export the (tabular) data to a (tabular) CSV:

See more ...

2015-02-22

## NTP "Leap not in sync"

Today I had a rather curious problem on my fileserver. I noticed that its system time was behind the clock, but when I tried to manually synchronize it with my timeserver, ntpdate failed with the error message "Leap not in sync".

See more ...

2015-01-18

## Adding Group Members Across Domains

Normally when you add a member to an Active Directory group you'll simply use the Add-GroupMember cmdlet from the ActiveDirectory module. Except when you have to do it across domains/forests where the source domain is still running Windows Server 2008 (not R2). As in "no AD PowerShell cmdlets" and "no Active Directory Web Service (ADWS)". *sigh*

See more ...

## HTML Width in Android Browsers

I finally got around to adding a style for mobile devices to this thing. Since I already do all the formatting via CSS, applying responsive design boiled down to adding a media query for devices with a given minimum screen width, and fine-tuning several values in the stylesheets. While doing that I ran into a weird problem, though.

See more ...

2015-01-17

## Dim var() Considered Harmful

VBScript arrays can be created with fixed or dynamic size. Fixed size arrays are rather straightforward. Define Dim var(4) and you have an array variable var with 5 elements (indexes 0 through 4). Unfortunately dynamic arrays aren't quite as simple.

See more ...

2015-01-12

## Translate VBA to PowerShell

Microsoft Office applications can be controlled from PowerShell in the same way they can be controlled from VBScript. Most of what was said in the previous article about translating VBA to VBScript applies to PowerShell as well, but there are some additional things to take care of due to the syntactical differences between PowerShell and the VB dialects.

See more ...

2015-01-05

## PowerShell Execution Policy Scopes

Sometimes when you try to change the PowerShell execution policy you'll get an error message that the setting was applied, but will be overridden by a setting in another scope:

Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of XXX. …

Execution policies can be defined in five different scopes, from LocalMachine (least specific) to MachinePolicy (most specific), where settings in more specific scopes take precedence over settings in less specific scopes. Use Get-ExecutionPolicy -List to see which scope has which setting.

See more ...