wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


start

SHIFT-WIKI - Sjoerd Hooft's InFormation Technology

This WIKI is my personal documentation blog. Please enjoy it and feel free to reach out through blue sky if you have a question, remark, improvement or observation. See below for the latest additions, or use the search or tags to browse for content.


Active Directory Certificate Services on Windows Server 2016

Summary: How to setup active directory certificate services on a domain controller.
Date: Around 2017
Refactor: 20 February 2025: Checked links and formatting.

This is a follow up on Active Directory Domain Controller in Azure. My next project is to create a PointToSite VPN towards the same azure environment but that requires certificates. And that brings in Certificate Services. Now remember, installing the Root CA in the same server that is a Domain Controller is not considered best practice. Reasons (among others) are:

  • Root CAs are best kept offline for security reasons which is not possible if you install it on a Domain Controller
  • You can't demote the Domain Controller without first having to remove the CA
  • The more services you host on one system, the more services you have to recover if that server goes down

But there are also benefits. Since you need less servers you pay less for OS, (virtual) hardware and licenses. This is especially a benefit if you are running a lab environment that is limited on budget.

Note that this kind of CA setup is also known as “Enterprise root CA on a Domain Controller online” and is only considered acceptable for lab environments.

→ Read more...

2025/06/01 11:59

Powershell: Copy Initiatorgroups Between NetApp Filers

Summary: This script can be used to copy all initiators within an initiator group to another filer.
Date: Around 2014
Refactor: 6 April 2025: Checked links and formatting.

→ Read more...

2025/06/01 11:59

Powershell Remoting: Check Windows Patch Status

Summary: Goal of the script is to check the patch status for a Windows Server using PowerShell Remoting.
Date: Around 2022
Refactor: 6 April 2025: Checked links and formatting.

→ Read more...

2025/06/01 11:59

PowerShell: Calculate Free Space on NetApp Volumes

Summary: A script to calculate the free space on NetApp mvolumes using PowerShell.
Date: Around 2014
Refactor: 6 April 2025: Checked links and formatting.

This is a script to calculate the amount of free space on NetApp Volumes (which is nice if you have thin provisioned LUNs).

# Debug mode
$debug = 0
if ($debug -eq "1"){Write-Host "DEBUG mode enabled!"; $ErrorActionPreference = "Stop"; Write-Host "On error: $ErrorActionPreference"}
 
# Import DATA ONTAP Module
Import-module D:\sjoerd\DataONTAP
 
# Select Filer with default option provided
$filer = Read-Host "Please enter the name of the filer you want to query [filer01]"
if ($filer -eq ""){$filer = "filer01"}
 
# Getting credentials for NetApp filer
while ($filercredentials -eq $null) {
  Write-Host "Please provide authentication credentials for NetApp filer $filer"
  $filercredentials = $Host.UI.PromptForCredential("Please enter credentials", "Enter NetApp filer credentials", "root", "")
}
 
# Connect to Filer
Connect-NaController $Filer -Credential $filercredentials | Out-Null
 
# Create a hash table for clear view of the output
$myTable = @()
 
ForEach ($volume in (Get-NaVol)){
   $SpaceInfo = "" | Select VolumeName,TotalSize,FreeSpace
   $SpaceInfo.VolumeName = $volume
   $totalsize = (Get-NaVol $volume).TotalSize
   $SpaceInfo.TotalSize = $totalsize / 1073741824
   $leftoversize = $totalsize
   Write-Host "Calculating free space for volume $volume with a total size of $SpaceInfo.TotalSize GB."
   ForEach ($lun in (Get-NaLun | where {$_.Path -match "/$volume/"})){
      if ($debug -eq "1"){Write-Host "Doing $lun now"}
      $lunsize = (Get-NaLun $lun).TotalSize
      $leftoversize = $leftoversize - $lunsize
      if ($debug -eq "1"){Write-Host "$volume with a total size of $totalsize has now $leftoversize space left"}
   }
   # Convert the amount of bytes left to gigabytes left and round it up to 2 decimals.
   $SpaceInfo.FreeSpace = [Math]::Round(($leftoversize / 1073741824),2)
 
$myTable += $SpaceInfo
 
}
 
$myTable

This wiki has been made possible by:

2025/06/01 11:59

<< Newer entries | Older entries >>

This wiki has been made possible by:

start.txt · Last modified: by sjoerd