Powershell: Export users from AD to Excel

Export all users from AD from a specific OU (recursive) to Excel

Get-ADUser -Filter * -SearchBase $OU -SearchScope Subtree | Select-object DistinguishedName,Name,UserPrincipalName | export-csv -path c:\temp\userexport.csv

Only enabled users

Get-ADUser -Filter * -SearchBase $OU -SearchScope Subtree | Select-object DistinguishedName,Name,UserPrincipalName,Enabled | Where {$_.Enabled -like "False"} | export-csv -path c:\temp\userexport.csv 

Basic Ruckus switch configuration

In this example, we are going to configure a Ruckus ICX 7150-24.

  1. Connect your computer to the switch with the console port
  1. Open Device Manager to look up the COM port number
  1. Open Putty and connect to the assigned COM port
  1. Login with the default username and password (super / sp-admin) and change the default password
  1. Configure the switch with default configuration
conf t
ip address
ip default-gateway
ip dns server-address
hostname SW1
cdp run
lldp run
no web-management http
web-management https
no telnet server
enable super-user-password <password>
username icxadmin password <password>
aaa authent login default local
aaa authentic web-server default local
clock timezone europe cet
  1. Save the configuration
wr mem
  1. Reboot the switch

Expand virtual disk of Azure SQL Virtual Machine

Expand a virtual disk of Azure SQL Virtual Machine in the Azure Portal.

Expanding of the disk can be done online.

  1. Go to the Azure Portal
  2. Search for “SQL virtual machines”
  1. Select your SQL virtual machine
  2. In the menu, select “Storage Configuration”
  1. Configure the data disk you want to expand
  1. Select the disk of the size where you want to expand the existing disk with
    • For example 1, your disk is currently 128Gib and you want to extend it to 256Gib, choose the 128Gib disk
    • For example 2, you disk is currently 256Gib and you want to extend it to 768Gib, choose the 512Gib disk
  1. That’s is, you don’t have to do anything in the OS