Hardware, Powershell, Skriptování

Determine partitions offset via PowerShell

source:
http://pctuning.tyden.cz/software/ladeni-windows/17030-optimalizace-windows-7-pro-ssd-co-funguje-a-co-ne?start=2
http://lifehacker.com/5837769/make-sure-your-partitions-are-correctly-aligned-for-optimal-solid-state-drive-performance

UNIX

HP-UX reset root password without old password

A real example:
– restart server using the management console
– boot into single user mode
– mount /var and /usr filesystems
– edit /tcb/files/auth/r/root
– set a new root’s password
– restart server

Powershell, Skriptování

Optimize PowerShell Performance

I often need to retrieve data from Active Directory in many iterations which is very demanding and consumes all the RAM. Processing gradually slows down as well. Off course, a reduced amount of data could help (http://dmitrysotnikov.wordpress.com/2007/07/24/optimize-powershell-performance-and-memory-consumption/). But sometimes it could be better to use a multi-dimensional hash table to temporarily store data from AD rather than reading the data in each iteration. Reading data from a local variable is more effective.

How to add a few attributes to our hash table called ‚ADUsersCache‘ in example below:

Than i can work with…