Friday, January 16, 2015
hp offline array configuration utility
HP’s website didn’t seem to work today. Just when i needed an offline ACU iso.
Seems they can be found here:
ftp://ftp.hp.com/ftp1/pub/softlib2/software1/pubsw-windows/p1067040366/
Friday, November 30, 2012
Write image to multiple usb sticks simultaneously
Very neat (freeware) piece of software to write an image to multiple usb sticks at the same time.
Friday, March 18, 2011
powershell - set disk quota using wmi
The 2003 powershell goes on :-)
Again, there are no available modules so i had to create my own.
How to set disk quota for a certain user (in megabytes) on a certain Windows 2003 server on a certain drive? Here’s how:
function set_disk_quota($username, $quota_hard, $computername, $disk) { # preferred quota mode is enabled+deny access to disk, which is type 2 # for logging purposes only but still allow disk access, select type 1 $default_quota_mode = "2" $query_quota_enabled_or_not = "select * from Win32_QuotaSetting where VolumePath='"+$disk+":\\'" $query_user = "select * from Win32_Account where name='"+$username+"'" $query_disk = "select * from Win32_LogicalDisk where DeviceID='"+$disk+":'" $quota_disk = get-wmiobject -query $query_quota_enabled_or_not -computername $computername if ($quota_disk.State -eq "0") { echo "CHECK - ERROR - state 0 = Quota not enabled on disk -$disk- of -$computername-" echo "setting quota" $quota_disk.State = $default_quota_mode $quota_disk.Put() } if ($quota_disk.State -eq "1") { echo "CHECK - WARNING - state 1 = Quota enabled on disk -$disk- of -$computername- but not access is not denied when over quota" echo "setting quota" $quota_disk.State = $default_quota_mode $quota_disk.Put() } if ($quota_disk.State -eq "2") { echo "CHECK - OK - state 2 = Quota enabled on disk -$disk- of -$computername- and access is denied when over quota" } $objAccount = get-wmiobject -query $query_user $objDisk = get-wmiobject -query $query_disk $objquota = (new-object management.managementclass Win32_DiskQuota).CreateInstance() $objquota.User = $objAccount.Path.RelativePath $objquota.QuotaVolume = $objDisk.Path.RelativePath if ($quota_hard -eq "0") { $objquota.Delete() echo "Quota deleted for $username" } else { $objquota.Limit = [int]$quota_hard * 1024 * 1024 * 1 # Set the warning level to 90% of the $hard_limit $objquota.WarningLimit = [int]$quota_hard * 1024 * 1024 * 0.9 $objquota.put() } }
Friday, November 12, 2010
areca use extra space after swapping hd’s
Say you have a raid5 volume of 3×500GB disks with an effective space of ~1TB.
You plug out 1 disk, swap it with a 1TB disk and let the areca rebuild the array.
You do the same for disk 2 and 3.
You’d probably think you’ll have an extra TB to use. But the areca won’t show you. Here’s how (undocumented feature):
- Login the browser management console (Raidset Functions > Rescue RaidSet)
- Enter the keyword “RESETCAPACITY Raid Set # 000”, confirm and submit. After that, controller will reconfigure the raidset capacity.
- Create an extra logical drive on the raidset