Schnitzelspechts Blog

Dezember 11th, 2011

Can’t connect to Microsoft#SSEE – Server not Found

When you’re experiencing problems connecting to Microsoft#SSEE, you should try to connect to this instance: \\.\pipe\mssql$microsoft##ssee\sql\query

In my case I had to connect to Microsoft#SSE using the instance-name by starting Microsoft SQL Server Management Studio Express as administrator. Otherwise I got an error telling me that the user has no access to that instance.

Tags: ,

November 19th, 2011

Why Win32_Product is bad!

I just came across a blogpost that tells us a few disadvantages about Win32_Product (in short: very slow, reconfigures EVERY msi-package that is queriable with Win32_Product, shows only msi-packages – no InstallShield-packages).

I’ve used that class to uninstall applications via PowerShell in the past. Now I have to search for another solution for automated uninstall-tasks.
I’d be glad if someone has an idear for this and would appreciate to receive comments or a mail about this.

Tags: , ,

Januar 12th, 2011

Trend Micro Client/Server Security Agent (CSA) uninstall ohne Passwort

Trend Micro CSA verlangt bei der Deinstallation ein Passwort.
Hat man dieses Passwort nicht zur Hand, lässt sich das Uninstall-Programm über die Registry überlisten.

Man öffne die Registry und steuere diese Registry-Hives an:
32-bit OS: HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc

64-bit OS: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc

Dort erstellt/ändert man den Wert des DWORD-Keys “Allow Uninstall” auf 1 und kann CSA ohne Passwortabfrage deinstallieren.

Quelle: http://esupport.trendmicro.com/Pages/Unable-to-uninstall-the-Client-Server-Security-Agent-for-Dell-because-it-is-prompting-for-a-password.aspx

Tags: , , ,

November 2nd, 2010

PowerShell: Accessing static WMI-methods with different credentials

I have to gather some information like serialnumber, installed office 2007 productkey from remote machines.
The serialnumber is no problem. All remote-machines are Dell-computers and the serialnumber is accessible like this:

(Get-WmiObject -class Win32_SystemEnclosure -Computer $remotecomputer -credential $cred).SerialNumber

But the Office-Key was a bigger problem. I found a very good script at powershell.com but there’s one problem:
When I use the type-accelerator [WMIClass] it’s not possible to provide credentials for the remote-machine.
Then I thought “ok, I’ll take Get-WmiObject to receive this object”, but [WMIClass]“\\$computername\root\default:StdRegProv” doesn’t return a Wmi-Object but a Wmi-Class! For example, I created a Variable which contains the result of the [wmiclass]-command and one which contains the result from gwmi querying “win32_systemenclosure”:

I started a long google-journey in order to find a solution for this (to be honest: I haven’t worked in the registry with PowerShell and WMI yet and didn’t want to re-write the script from powershell.com).
I finally (and luckily) found a hint here. The Microsoft-Team improved WMI-Support in PowerShell V2.
To get the same result like [wmiclass]“\\$computer\root\default:stdregprov”  but with explicit given credentials it’s now possible to do this:

$wmi = get-wmiobject -list -namespace root\default -computername $computer -credential domain\user | where-object { $_.name -eq "StdRegProv" }

That return’s the WMI-class StdRegProv in namespace root\default like the WMI-type-accellerator-command.

Now I only have to replace the line which contains [wmiclass]“\\$computer\root\default:stdregprov” with this solution and I can use the script without further changes.

Tags: , , , , ,

Oktober 30th, 2010

Neue 1TB-Festplatte zeigt nur 32MB Kapazität an

Heute sind endlich meine 4 1TB-HDDs gekommen. Die brauche ich für mein NAS, das ich mit FreeNAS zusammenbastel.

Nachdem endlich alle Festplatten eingebaut waren und FreeNAS per Live-CD gebootet hat, wurden mir in der Installation für 2 Festplatten nur 32MB Kapazität angezeigt.
Zuerst habe ich die Verkabelung überprüft. Die war aber Fehlerfrei.
Nach ein bisschen googlen fand ich heraus, dass bei Gigabyte Motherboards mit Xpress Recovery BIOS ab und zu Probleme mit 1TB-Festplatten haben.

Bei der Problemlösung hilft HDAT2.
Die Ursache ist ein Bug im Bios der Probleme bei einem gesetzten Wert für HPA hat.
Mit HDAT2 kann man diesen Wert wieder aufheben:

Zuerst startet man die Live-CD, danach Tippt man “HDAT2″ ein und folgt dann diesen Anweisungen.

Tags: , , ,