Author Archives: mralcadmin

Admin Admin Podcast #041 Show Notes – The NET Command

Al has been playing with RMM Products and dealing with network loops again.
Andy has been fixing gaming PCs and it always good to carry some spare terminal paste
Jerry has been learning Python with “automate the boring stuff

Synsolgy ds716+ is the NAS Al used on a client site with btrfs and Snapshot replication to second Synsolgy NAS

Ansible on Windows talk

Icinga2 is the monitoring platform Jerry is using to replace nagios.

Rclone for remote backup to dropbox (and other services) 

Al Monitoring Software:

Command to find files over 200mb in the users folder

“forfiles /P C:\users /M *.* /S /C “cmd /c if @fsize gtr 209715200 echo @path @fsize @fdate @ftime”

handle.exe to find which file is open

Process explorer 

Net Command:

Unlock domain account on a DC:

Net user accountname /DOMAIN /active:YES

Add Local User:

net user accountname

List users in the administrator Group:

net localgroup administrators

Remove domain users from a local group:

net localgroup administrators domainname\accoutname /delete

Admin Admin Podcast #040 Show Notes – Cattle vs Pets

Al been on Office365 Course:Managing Office 365 Identities and Services

Andy been fixing printers at a play house with netscan, problem with routers and arp tables.

Jerry been talking abot “cattle v pet” model and Immutable infrastructure

Windows PowerShell, there are two types of quotes ‘single speech marks’ and “double speech

Paper Trail log monitoring

Agile user story

Stop DDOS on website

Send email with you AD password going to expiry:

Scrapyard wars 

Postgres – psql – extensions to postgres – http://railsware.com/blog/2012/04/23/postgresql-most-useful-extensions/

Admin Admin Podcast #039 Show Notes – SPF and DKIM

A Table which compares Raid:

radlevel

Al Has been:

  • replaced a disk in RAID 10 array
  • Been looking at AD acounts locks out using this software
  • Ways to find out who has logon on to what PC, BATCH or Powershell

Jerry Went to Ansiblefest in London and learnt:

Andy been

Dealing with other tradesman
Trouble with customers not paying ISP bill
Play with the SC command

Sender Policy Framework

A example SPF Records:
example.com. IN TXT “v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.123 a -all”

DomainKeys Identified Mail

How it works

The new podcast Al has found Root Access Podcast and the Belkin Stride360° Messenger Bag he mention 

 

 

Admin Admin Podcast #038 Show Notes – WOW Scripts are cools!

  • Al been playing with powershell to automate things and he loving it!
  • Andy has been playing with Linux on old hardware and listen this episode of Linux Luddites about ReactOS
  • Jerry has been looking at rolling out Ansible to manage his servers at work

Al Script to create AD accounts

How to Connect to office365 via powershell

Scripts to assign a license office 365

Google dig tool

Al used “netstats – a” to find what IP address was listening on port 25

Allow external reply in Exchange 2010

profwiz  Tool to migrate local user profiles to a Domain Profile

2000px-RAID_10_01.svg

Links to Promise Guide to Raid

The Expanse – SCI-FI Show Jerry Was talking about

 

PowerShell Script to Create new users in Active Directory

This scripts create users in active directory by look for the details listed in a CSV file which can be download here, and add a proxy email address, add to AD Groups and place them in a OU called temp OU.

You will need to change a number of values to match you environment:

  • @emaildomain.co.uk
  • OU=TempOU,DC=domain,DC=local
  • Name of the groups you would like them to be added to

If I had more time I would add in variable so you can easily change the value (may be in the future)


$csv_info = import-csv "C:\PSScripts\newusers.csv"
foreach ($line in $csv_info) 
{
    $name = $line.GivenName + " " + $line.Surname
    $samaccountname = $line.GivenName + "." + $Line.surname
    $emailaddress1 = $samaccountname + "@emaildomain.co.uk"
    $emailaddress = $emailaddress1.ToLower()
    $GROUP1 = $line.GROUP1
    $GROUP2 = $line.GROUP2
    write-host $name
    write-host $samaccountname
    write-host $emailaddress
    New-ADUser -GivenName $line.GivenName -Surname $line.Surname -Name $name -DisplayName $Name -UserPrincipalName $emailaddress -SamAccountName $SamAccountName -EmailAddress $emailaddress -Enabled $True -AccountPassword (ConvertTo-SecureString $line.Password -AsPlainText -force) -path 'OU=TempOU,DC=domain,DC=local'
    Set-ADUser $samaccountname -add @{ProxyAddresses="SMTP:$emailaddress"}
 
  If($GROUP1 -eq "YES")
 {
   Add-ADGroupMember -Identity "GROUP1" -Member $samaccountname
   write-host "Added to GROUP1"
 }

 If($GROUP2 -eq "YES")
 {
   Add-ADGroupMember -Identity "GROUP2" -Member $samaccountname
   write-host "Added to GROUP2"
 }
 
}

PowerShell Script to Assign License in Office365

Use the following script to Assign License in Office365

First connect to Office 365 via PowerShell


Get-MsolSubscription

This list the current license available in Office 365.


Set-MsolUser -UserPrincipalName username@office365domain.co.uk -UsageLocation UK

You first need to set the users to their local location in my case UK


Set-MsolUserLicense -UserPrincipalName username@office365domain.co.uk –AddLicenses “OFFICE365DOMAIN:O365_BUSINESS_ESSENTIALS”

This command assigns the licesnes you will need

Admin Admin Podcast #037 Show Notes – Its All About The RAID

Al been learning by mistakes, Always check your hardware and Dealing with ilo4 and Datto Device

Jerry has been clone daughter laptop and received the following Error Message:??????

Andy dealing with Secure boot and EFI bios, Trinity Rescue Disk Trinity

We discuses Raid this week:

Different between software and Hardware Raid

Mdadm is Linux Software RAID management tool

Raid 0 – Which has no redundancy require more than two disk. So data normally is split of blocks of 64k, the first block is written to disk 1 and section written to disk 1 and then third data written 1st disk and so. Used to create large disk volumes and is fast writing to disks.So if you are write 100mb data each drive is write 50mb at once compare 1 drive writing a 100mb. So twice as fast and reads twice as fast as both disk can find the data which is being requested. Also no storage space lost.

Raid 1 –  Require two disk same size. Each block of data is written to both drive. You lose half storage (so if you have 2 x 1TB disk you get 1TB virtual disk). Their is Hit of write speed as both disk need to confirm that data has been written to both disk, You may get a bit fast read speed as you have two heads seeking for data. You can tolrate one disk failing,

Raid 5 – mean you can get greater storage, but you always lose one disk for parity so let say you have 4 disk in array, 4 x 1TB your storage space you would get would be 3TB. Parity  is a equation, called exclusive xor. Let think of easiy way of doing, so data written on disk 1 is 2, Data on disk 2 = 4 and data on disk 3 = 5, So the parity is would be those number add together 11 and written to the 4 disk.  so if we ever lost of drive (1-3) we could work out the value ie if we lost disk, using the parity of 11, we could subtract the other value on disk 2 and 3 so 11 – 4 – 5 = 2. The data which was store on disk 1. So if you had a disk failure and request that data the raid controller can restructure your data and present in to you in degrade mode. This would be slower as the controller would need to do this every time you request data.

The parity is not store on one disk, so first it would store data a on disk 1 and data b on disk 2 and data c on disk 3. Parity on disk 4. next time the data a could be written on disk 2 and data b is written on disk 3 and data c on disk 4 and parity on disk 1 and so so.

RAID 6 – Is the same as RAID 5 but you have two disk for Parity. You need a minimum of 4 disks,

http://blog.open-e.com/how-does-raid-5-work/