Skip to content

feat: msft-win-azure-migration-discovery#108

Open
AlrightLad wants to merge 3 commits into
mainfrom
feature/msft-win-azure-migration-discovery
Open

feat: msft-win-azure-migration-discovery#108
AlrightLad wants to merge 3 commits into
mainfrom
feature/msft-win-azure-migration-discovery

Conversation

@AlrightLad

Copy link
Copy Markdown

feat: msft-win-azure-migration-discovery

Standardized read-only discovery script for Azure/Entra migration SOW scoping. Companion SOP: KB 3893 (Azure Migration Discovery & SOW Development SOP), which owns the workflow: AM request → run this per server → decision tree (cloud-native / IaaS-AVD / hybrid / stay-on-prem) → SOW → AM deliverable.

What it does

  • Detects run context (Physical / Hyper-V Host / Hyper-V Guest / RDS Session Host / DC) and gathers context-appropriate evidence; all sections degrade gracefully when a role/module is absent
  • Identity: full AD state incl. krbtgt age, UPN/.local flags, GPO inventory, stale computers, Entra/M365 signals in AD (hybrid-join SCP, AZUREADSSOACC$, MSOL_ accounts)
  • Workloads: RDS deployment + CALs + live sessions, SQL instances + DB footprint, ODBC DSNs, apps, service accounts, shares (size/recency/ACLs), print, DHCP/DNS, IIS bindings, Hyper-V host audit (VHDX actual sizes, checkpoints, SET/LBFO, VMQ)
  • Dependencies both directions: listening ports→process, established outbound→process, live SMB/RDP consumers, GPP drive maps, logon scripts, hosts file
  • Blockers/cost inputs: NTLM auth audit (4624), SMB1/LmCompatibilityLevel posture, firmware/boot style (Azure Gen1/Gen2), Windows activation channel (AHB eligibility), backup posture, existing Azure/hybrid agents (Arc, MARS, AVD, File Sync, App Proxy, ASR, FSLogix, Cloud Sync, Printix)

Conventions

  • Non-interactive, no Read-Host; NinjaOne variables read via $env: with defaults (scanShareSizes, includeDhcpLeases, maxDnsRecords, ntlmAuditDays, saveReportToDisk)
  • 64-bit self-relaunch from NinjaOne's 32-bit default; SYSTEM context
  • Sectioned stdout to activity feed (Server Lifecycle audit pattern) + optional full report/transcript with rotation in C:\ProgramData\DTC\AzureMigrationDiscovery
  • Read-only — makes no changes

Validation

  • PSScriptAnalyzer 1.25.0: clean
  • Field-tested via NinjaOne: <fill in which box(es)/context(s) you ran>
  • No Pester tests included — repo currently has zero *.Tests.ps1; matched the demonstrated bar rather than introducing a test convention inside a feature PR. Happy to add if we want that as a repo standard.

Notes for review

…n SOW scoping

Read-only NinjaOne discovery script covering physical, Hyper-V host/guest,
and RDS contexts. Gathers identity, workload, dependency, licensing, and
existing-cloud-footprint evidence per KB 3893 (Azure Migration Discovery
& SOW Development SOP). PSScriptAnalyzer 1.25.0 clean; field-tested.
@AlrightLad AlrightLad requested a review from Gumbees as a code owner July 7, 2026 19:57

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has reached its monthly code review spending cap.

An organization admin can view or raise the cap at claude.ai/admin-settings/claude-code. The cap resets at the start of the next billing period.

Once the cap resets or is raised, push a new commit or reopen this pull request to trigger a review.

Downlevel servers (2012 R2 era, WMF4) failed before execution while NinjaOne
reported SUCCESS. Script now runs degraded with an explicit version banner and
labels collection gaps as not-collected rather than absent.
…NinjaOne wrapper

[CmdletBinding()] param() must be the first statement; NinjaOne's generated
customscript wrapper can prepend content, producing 'Unexpected attribute'
parser failures. The block was functionally unused (no parameters; env-var
pattern). Script is now position-independent. Validated: AST parse clean,
full local execution exit 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant