This document outlines a detailed plan for upgrading and migrating from Windows Server 2012 to Windows Server 2019. It covers pre-migration assessment, setup on the new server, application and data migration, testing, and post-migration tasks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PLAN_OPTIONS ?= | |
| APPLY_OPTIONS ?= | |
| EXCLUDE ?= | |
| INCLUDE ?= | |
| # For Terraform 0.12 (using `-no-color` to avoid dealing with terminal color) | |
| define PLAN_OPTIONS_EXCLUDE | |
| $(shell terraform show -no-color current.plan | perl -nle 'if (/\s# (.*?)\s/) {print $$1}' | grep -E -v '$(1)' | sed -e 's/^/-target="/g' -e 's/$$/"/g' | xargs) | |
| endef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -uo pipefail | |
| _VSCODEDIR="$HOME/.vscode/extensions" | |
| _COPILOTDIR=$(ls "${_VSCODEDIR}" | grep -E "github.copilot-[1-9].*" | sort -V | tail -n1) # For copilot | |
| _COPILOTDEVDIR=$(ls "${_VSCODEDIR}" | grep "github.copilot-nightly-" | sort -V | tail -n1) # For copilot-nightly | |
| _EXTENSIONFILEPATH="${_VSCODEDIR}/${_COPILOTDIR}/dist/extension.js" | |
| _DEVEXTENSIONFILEPATH="${_VSCODEDIR}/${_COPILOTDEVDIR}/dist/extension.js" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-SSLCertificateExpiryDetailsFromURL { | |
| param ( | |
| [ValidateNotNullOrEmpty()] | |
| [string]$InputFilePath = ".\input.csv", | |
| [string]$OutputFilePath = ".\output.csv", | |
| [bool]$ExportToCsv = $true, # Control CSV export | |
| [int]$TimeoutMilliseconds = 20000, # Timeout duration in milliseconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Join-CustomObject { | |
| param ( | |
| [Parameter(Mandatory = $true)] | |
| [pscustomobject[]]$FirstObject, | |
| [Parameter(Mandatory = $true)] | |
| [pscustomobject[]]$SecondObject, | |
| [Parameter(Mandatory = $true)] | |
| [string]$FirstObjectJoinProperty, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List of remote servers | |
| $servers = @("Server1", "Server2", "Server3") # Replace with your server names | |
| # List of Event Log names to query | |
| $logNames = @("System", "Application", "Security") # Replace with your desired log names | |
| # File paths for output | |
| $detailedOutputFile = "EventLogSources.csv" | |
| $uniqueOutputFile = "UniqueEventLogSources.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-EventLogData { | |
| param( | |
| [string[]]$logNames, | |
| [datetime]$startDate, | |
| [string]$server | |
| ) | |
| $results = @() | |
| foreach ($logName in $logNames) { | |
| try { | |
| Write-Host "Querying LogName: $logName on $server" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-EventLogData { | |
| param( | |
| [Parameter(Mandatory = $true)] | |
| [string[]]$Servers, | |
| [Parameter(Mandatory = $true)] | |
| [string[]]$LogNames, | |
| [Parameter(Mandatory = $true)] | |
| [string[]]$ProviderNames, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [switch]$ExportToCsv | |
| ) | |
| # Attempt to execute 'dotnet --info' and capture the output | |
| try { | |
| $dotnetInfo = & dotnet --info 2> $null | Out-String | |
| } catch { | |
| $dotnetInfo = $null | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [switch]$ExportToCsv, | |
| [string]$CsvPath = "C:\ports_info.csv" | |
| ) | |
| function Get-TcpConnections { | |
| try { | |
| $connections = Get-NetTCPConnection | |
| $processes = Get-Process |