Update AD Custom ExtensionAttributes or Remove


Used this script at a customer environment to remove AD ExtensionAttributes, also you can use Add, Replace or Clear


get-aduser -properties extensionattribute1 -searchbase “OU=USERS,DC=local,DC=lan” -filter * | Where {$_.extensionattribute1 -eq “ANYTEXT” } |  % { Set-Aduser -identity $_ -Remove @{extensionattribute1=@(“ANYTEXT”)}}

Credits:
https://github.com/Seidlm/Active-Directory/blob/main/Update%20Active%20Directory%20User%20Properties.ps1

Free online trainings

For this post I was thinking to share my latest free training courses I found.
These courses includes videos and some have hands-on labs with nice help information and easy guidance to follow. For a majority courses that I have done, each lesson or course ends with some quiz questions to test your knowledge.

1. IBM Skillsbuild: https://skillsbuild.org/

– So what is this site all about ?
Answer: “IBM recently launched IBM SkillsBuild, which brings together two world-class skills-based learning programs – “Open P-TECH” and “SkillsBuild” – under one brand. Through IBM SkillsBuilds, educators, job seekers and the organizations need to access free digital learning, tools and support focused on the key technologies and workplace skills needed to succeed “new collar” jobs. They can visit the new IBM SkillsBuild website and choose the learning experience that is best for them.”

– It’s accessible for everyone from students who want to start a career, jobseekers to organisations supporting job seekers’ students that can take advantage of free resources and training to get the most out of the SkillsBuild platform’s content and functionality.

2. Cisco: https://www.netacad.com

– Cisco Networking Academy has also free learning courses but some advanced training are paid.
There are free beginner courses like Cybersecurity, Linux or Networking and I have done a few and each of some have a clear overview of the subjects with practical hands-on labs and guidance.

 

3. Cisco: https://skillsforall.com/

– About: Skills for All is brought to you by Cisco Networking Academy. It is the latest advancement in Cisco’s purpose to power an inclusive digital future with leading-edge courses and resources. Designed by industry experts to empower all people with career opportunities specifically for online learning and at no charge. Free online courses backed by Cisco’s expertise and connected to real career path’s.

– Very technical courses and nice hands-on practicals. I started a few cybersecurity courses and want to get more out of it starting with Cisco Packet tracer and networking basics.


4. https://codered.eccouncil.org/

– About: CodeRed is a subscription-based learning platform for busy cyber professionals created by EC-Council, the leader in cyber security training.

– Also a good basic foundation for cybersecurity and technical networking skills that has funny and nice to follow long training video’s, each lessons ends with a few quiz questions to test your knowledge. Some are free trainings but for advanced courses or bundles you have to pay.

5. Rangeforce: https://www.rangeforce.com/

– About: The World’s Most Comprehensive Cybersecurity Training and Cyber Skills Assessment Program

– For the free courses and labs available, you have to sign-up for the Free Community Edition.
https://go.rangeforce.com/community-edition-registration
It takes a while before you get to make a new account, if you still haven’t received your credentials after 12 or 24 hrs, just try to reset your password and you will get a reset link.
The login page will be https://portal.rangeforce.com

– There are a few modules which prepare you for different labs where you can follow some practical courses regarding cybersecurity around Windows and Linux vulnerablities.




6. Cisco Advanced Malware Protection
https://learningnetwork.cisco.com/s/advanced-malware-protection-training-videos

– About: Welcome to the Cisco Advanced Malware Protection technical webinars and training videos series. Join Cisco experts as they cover key information on Cisco Threat Response, Advanced Malware Protection, and more. These live sessions will help you get up to speed quickly with these powerful security solutions from Cisco.

– Nice starter if you work with Cisco AMP, simple guidance and explanation videos regarding these Cisco cybersecurity products.


And at last here are some free cybersecurity or non-technical courses I found online or got via Linkedin members but for some haven’t signed up for or tested:

https://tryhackme.com/

https://academy.picussecurity.com/home

https://www.cybrary.it/

https://blueteamlabs.online/

https://training.fortinet.com/

https://go.cyberbit.com/100k-worth-of-free-remote-cyber-range-training/?utm_source=nist_website&utm_medium=list&utm_campaign=free-remote-soc-team-training-nam

https://cyberlab.evolvesecurity.com/#/welcome

https://www.nist.gov/itl/applied-cybersecurity/nice/resources/online-learning-content

Microsoft Ninja Trainings:
https://azurecloudai.blog/2021/05/12/all-the-microsoft-ninja-training-i-know-about/

Non-Technical trainings:

https://www.scrumstudy.com/

Lean Six Sigma Yellow Belt

Scrum Fundamentals

How to export csv diskspace usage multiple servers

Create a file for example : Diskspace.ps1

Create a textfile C:\temp\servers.txt , and put the servernames under each other.

$DiskSizeReport = @()

$computers = gc C:\temp\servers.txt

$computers | ForEach {

$Disks = Get-WmiObject win32_logicaldisk -ComputerName $_ -Filter “Drivetype=3” -ErrorAction SilentlyContinue |

Select-Object @{Label = “Server Name”;Expression = {$_.SystemName}},

@{Label = “Drive Letter”;Expression = {$_.DeviceID}},@{Label = “Total Capacity (GB)”;Expression = {“{0:N1}” -f( $_.Size / 1GB)}},

@{Label = “Used Space (GB)”;Expression = {(Round($_.Size /1GB,2)) – (Round($_.FreeSpace /1GB,2))}},

@{Label = “Free Space (GB)”;Expression = {“{0:N1}” -f( $_.Freespace / 1GB ) }},@{Label = “Free Space (%)”; Expression = {“{0:P0}” -f ($_.freespace/$_.size) }}

$DiskSizeReport += $Disks

}

$DiskSizeReport | Export-CSV “C:\DiskSizeReport.csv” -NoTypeInformation -Encoding UTF8

List folder delegate permissions Exchange mailbox

URL Source: https://www.pickysysadmin.ca/2019/08/28/list-audit-all-folder-delegate-permissions-on-an-exchange-mailbox/

Vereisten: Exchange Administrator rechtenWindows Powershell

  1. Install Exchange online Powershell EXO

    Install-Module PowershellGet -Force
    Update-Module PowershellGet
    Set-ExecutionPolicy RemoteSigned
    Install-Module -Name ExchangeOnlineManagement
  2. Connect-ExchangeOnline
  3. Run script

    $mailbox = “john.doe@domain.com”
    $permissions = @()
    $folders = Get-EXOMailboxfolderstatistics $mailbox | % {$_.folderpath} | % {$_.replace(“/”,”\”)}

    # Get the root folder of the mailbox
    $folderKey = $mailbox + “:” + “\”
    $permissions += Get-EXOMailboxFolderPermission -identity
    $folderKey -ErrorAction SilentlyContinue | Where-Object {$_.User -notlike “Default” -and $_.User -notlike “Anonymous” -and $_.AccessRights -notlike “None” -and $_.User -notlike $mailbox}

    # Get the rest of the folders
    $list = ForEach ($folder in $folders)   {    $folderKey = $mailbox + “:” + $folder    $permissions += Get-EXOMailboxFolderPermission -identity $folderKey -ErrorAction SilentlyContinue | Where-Object {$_.User -notlike “Default” -and $_.User -notlike “Anonymous” -and $_.AccessRights -notlike “None” -and $_.User -notlike $mailbox}   }
    $permissions | Format-Table -AutoSize

Exchange Test environment in Azure

Just found a cool post on hybrid-365.com where u can read how to setup an Exchange environment for testing purposes in Azure

https://www.hybrid-365.com/exchange/exchange-basics/exchange-test-environment/

You can use this also for Exchange 2019 and for better understanding of the new topology it is good to read these info first.
https://docs.microsoft.com/en-us/Exchange/new-features/new-features?view=exchserver-2019

I’m testing this in Azure….

I also found another testing lab what’s kinda interesting to test, maybe i’ll post this later

https://gallery.technet.microsoft.com/AutomatedLab-026d81f9

 

Exchange 2013, Exchange 2016, Exchange 2019, Azure, Office365, Hybrid

Ubuntu updates and deploy Splunk inside Docker container

  • Docker-logoubuntu-logo14

Last week I began to dive a little bit into Docker but not on Windows box/bash but to run it ontop of  Ubuntu. Offcourse Google and the right search terms helped me to set it up quite easily.

I installed different versions of Ubuntu, I used Ubuntu Server 18.04.4 LTS and Ubuntu Server 19.10. You can upgrade from 18 to 19 or install new version 19. About the differences there is a lot to read but then again, you dont need to upgrade,  “if it aint broke don’t fix it”.

#NOTE:if your not logged-in as root, use this command

sudo apt-get update && sudo apt-get upgrade
#if root then
apt-get update
apt-get upgrade

  • You can install docker with these commands.

apt-get update
apt-get remove docker docker-engine docker.io
apt install docker.io
systemctl start docker
systemctl enable docker

 

docker pull splunk/splunk:latest
docker run -d -p 8000:8000 -e ‘SPLUNK_START_ARGS=–accept-license’ -e ‘SPLUNK_PASSWORD=changeme’ splunk/splunk

  • Just in case when the container stops working, its very usefull to run this command.
    Its handy to tail the log within the docker container.

After you run the command at point 4. above, then you get the Container ID shown at the red arrow below. You run the command “docker logs followed with the ID.
docker logs -f dd915b35edf327a75786b5166c2d367923ce247a83726ca77c6ed542f972ab64

Untitled 3

I stumbled upon this command because I couldnt figure out why this container stopped when I entered a different password at step 4. And I had to troubleshoot this issue.

  • To test this Splunk app within Docker, you need to use this URL:
    http://192.168.0.24:8000/ with the given credentials you set in step 4.

#Note: Use your own ip addres, and to check your ip, for example use this command and check your output. # ip a | grep inet

Export unread Office 365 Emails

Finally found and made some adjustments to a Powershell script that checks the number of unread emails from mailboxes in Office 365 / Exchange Online.

And for this to run correctly and scheduled on a Windows box you have to first start these 2 lines with a service account so that you dont fill in the password in the scriptfile.
$UserCredential = Get-Credential
$UserCredential.Password | ConvertFrom-SecureString | Set-Content C:\Temp\scriptsencrypted_password1.txt

If you need more info let me know.

Powershell script:
https://1drv.ms/t/s!Audb13lmZhZosgEauNWqq49QsJ_z?e=tAGwXV

Requirements:
Powershell
Microsoft Exchange Web Services Managed API 2.2
Perseverance (If this script doesnt work the way you want 😉

URL source where I found the original script:
https://stackoverflow.com/questions/42240798/office-365-unread-email-powershell-admin-report