Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

six demon bag

Wind, fire, all that kind of thing!

2016-10-20

Reset VSS Writers

VSS writers are application-specific components for Microsoft's Volume Shadow Copy Service, which ensure the consistency of application data when a shadow copy is created. That's quite useful for creating consistent backups of a system. However, some of these writers go into error states more or less frequently. And Microsoft did not deem it necessary to document how to reset writers without rebooting the entire system (or at least I didn't manage to find that piece of information).

See more ...

Posted 12:10 [permalink]

2016-09-01

Forwarding JVM Garbage Collector Logs

Recently I was tasked with forwarding logs to a central log server - in this case JVM garbage collector logs from Solr instances. Normally not a big deal. Configure log rotation (to avoid filling the disk), then have rsyslog read the active log file via an imfile input.

Sounds simple, right? Until you realize that JVM log rotation marks the active log with the extension .current and rotates that extension instead of actually rotating the logs.

See more ...

Posted 23:27 [permalink]

2016-04-12

Spark Workers Not Starting

If you're using Apache Spark and run into an issue where your workers fail to start, make sure that the workers use the same SPARK_MASTER_IP value that was used when starting the master. You can see it in the top left corner of the master's web interface:

URL field in Spark web interface

See more ...

Posted 21:37 [permalink]

2016-02-27

VBSdoc - A VBScript API Documentation Generator

API documentation is nice, and being able to generate it from the code is even nicer. However, unlike Perl, Python, Java, or several other languages, VBScript doesn't have a feature or tool that supports this. Which kinda sucks.

I tried VBDOX, but didn't find usability or results too convincing. I also tried doxygen by adapting Basti Grembowietz' Visual Basic doxygen filter. However, doxygen does a lot of things I don't actually need, and I didn't manage to make it do some of the things I do need. Thus I ended up writing my own VBScript documentation generator.

See more ...

Posted 19:15 [permalink]

2016-01-04

Cannot delete my own scheduled task

Recently I noticed that I was no longer able to delete scheduled tasks on my Windows 7 test box, even though I created them myself. Deletion attempts failed with the following error:

The user account does not have permission to delete this task.

Deleting my own tasks works fine in a vanilla install of Windows 7 SP1, so the issue must have been introduced by some update along the way. I had to modify the permissions on C:\Windows\System32\Tasks to get it to work again:

icacls "C:\Windows\System32\Tasks" /grant "Authenticated Users":(RD)

Granting "list folder/read data" on the folder itself was sufficient, since the task files are owned by the user creating them and the CREATOR OWNER principal has full access to subfolders and files.

Posted 19:51 [permalink]

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

Posted 01:13 [permalink]

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:

$dt | Export-Csv -Path 'C:\path\to\table.csv' -NoType

However, the problem with this approach is that you lose the type information for the columns of the datatable (the only type information saved by the Export-Csv cmdlet is about the type of the objects representing the rows). Also, there's no simple way to restore the CSV back to a datatable.

See more ...

Posted 17:01 [permalink]

2015-09-29

Hyper-V Live Migration fails with error 0x80090303

If you have a live migration fail with an error like this:

Live migration of 'Virtual Machine VM01' failed.

Virtual machine migration operation for 'scvmm_instance' failed at migration source 'Hypervisor01'. (Virtual machine ID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)

The Virtual Machine Management Service failed to establish a connection for a Virtual Machine migration with host 'Hypervisor02': The specified target is unknown or unreachable (0x80090303).

The Virtual Machine Management Service failed to authenticate the connection for a Virtual Machine migration at the source host: The specified target is unknown or unreachable (0x80090303).

check that both hypervisors have the required SPNs registered.

See more ...

Posted 17:22 [permalink]

2015-06-14

Querying DB2 Backups in TSM Fails with Return Code 106

On one of my servers a query for DB2 backups in TSM (db2adutl query full db DBNAME) failed with the following error:

Error: Initialize environment failed with TSM return code 106

As per dsmrc.h return code 106 indicates a permission problem:

#define DSM_RC_ACCESS_DENIED       106 /* denied due to improper permission */

which was weird, since the user in question is a member of the DB2ADMNS group that is supposed to have all required permissions.

See more ...

Posted 23:40 [permalink]

2015-06-07

Using the DB2 Command Line Processer from PowerShell

Even for DB2 10.5 the official documentation says to use the db2cmd command for a Command Line Processor enabled environment on Windows:

On Windows operating systems, db2cmd command opens the CLP-enabled DB2® window, and initializes the DB2 command line environment.

However, being able to use PowerShell instead of db2cmd would be much nicer, since the former is far more versatile in practically every respect (control structures, output processing, file handling, etc.).

See more ...

Posted 01:38 [permalink]

2015-03-18

Now With a Tag Cloud

As you can see my blog now has a fancy tag cloud. This is my first attempt at a Blosxom plugin, and I'm quite proud of it. *^_^*

I've already been using Gregor Rayman's keywords plugin for auto-generating the keywords meta tag, so I wanted something based on that rather than having to use an additional tag line as required for the tagcloud plugin. The tag cloud is generated from the keywords with the HTML::TagCloud Perl module, and I'm using Fletcher Penney's find plugin for linking to blog posts that match the respective keyword. The find plugin also gives me a nice search box (another thing I've been wanting to add for a while). Sweet.

Download: wordcloud-0.1

The keywords and find plugins are included, since their homepages don't seem to be online anymore. Also included is a patch for HTML::TagCloud that allows for case-insensitive sorting.

Posted 20:37 [permalink]

2015-03-12

Repairing a Suspect msdb Database

Sometimes a situation arises where an SQL Server instance comes back up with a database tagged as "suspect". Apparently there is a number of possible causes for this, like transaction log corruption, insufficient memory or disk space, or unexpected shutdowns due to hardware or power failure. In our case the reason was probably a hardware failure, since the database resides on an iSCSI volume, and we were making changes to our iSCSI network. And to make things a little bit more interesting, our msdb database just had to be among the affected databases.

See more ...

Posted 19:07 [permalink]

Transfer Active Directory Site Subnets

A while ago I had to take a couple hundred subnets (don't ask) of an Active Directory site in one domain and re-create them in another domain. Doing that manually would've been a real pain. But if you export the subnets to a file the list can easily be transferred to the other domain and imported there.

See more ...

Posted 17:42 [permalink]

2015-03-09

Drag & Drop in a PowerShell GUI

For a little PowerShell GUI (using Windows Forms) the requirement to drag & drop files into a listbox came up. Some quick googling showed several articles (like this one) suggesting to set AllowDrop = $true and add a handler for the DragEnter event.

See more ...

Posted 19:18 [permalink]

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

Posted 21:40 [permalink]

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

Posted 18:25 [permalink]

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

Posted 16:59 [permalink]

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

Posted 18:26 [permalink]

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

Posted 16:30 [permalink]

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

Posted 22:46 [permalink]