Skip to main content

Posts

Partitioning with fdisk

                         This section shows you how to actually partition your hard drive with the fdisk utility. Linux allows only 4 primary partitions. You can have a much larger number of logical partitions by sub-dividing one of the primary partitions. Only one of the primary partitions can be sub-divided. Examples: 1.       Primary partition 2.       Mixed primiary and logical partition Notes about fdisk: fdisk is started by typing (as root) "fdisk device " at the command prompt. "device” might be something like /dev/hda or /dev/sda. The basic fdisk commands you need are: p print the partition table n create a new partition d delete a partition q quit without saving changes w write the new partition table and exit Changes you make to the partition table do not take effect until you issue the write (w) command. Here is a sample partition table: Disk /dev/hdb: 64 heads, 63 sectors, 621 cylinders Units = cylinders of 4032 * 512 bytes   

Inactive computer account clean up

                         As workstations get added and removed to AD, computer accounts become needs to be cleaned up so they can be used for new computers. The following Powershell code retrieves all computers that either has not logged into AD for more than 90 days or never logged in and exports into a file. Get-QADComputer -SizeLimit 0 -IncludedProperties LastLogonTimeStamp -SearchRoot 'ad.umbc.edu/Dept' | where { ($_.AccountIsDisabled -eq $ false ) -and (($_.LastLogonTimeStamp -eq $ null ) -or ((((get-date) - $_.LastLogonTimeStamp).Days) -gt 90)) } | Select- Object Name, ParentContainer, DN | Sort -Property ParentContainer| Export-Csv <file>