Skip to content

Commit 4635d84

Browse files
authored
v1.98.62 — Storage Migration Service (module 69, 70 modules total) (#19)
New feature: Modules/69-StorageMigration.ps1 installs Storage Migration Service (SMS) — Microsoft's file-server migration tool. Functions: Test-SMSInstalled, Test-SMSProxyInstalled, Get-SMSStatus, Install-SMSRole, Install-SMSProxy, Show-StorageMigrationManagement. What it does: - Installs the SMS orchestrator role (coordinates migration projects). - Optionally installs the SMS-Proxy feature (run on the destination server for local-speed transfers). - Reports orchestrator/proxy state, SMS service status, and the Get-SMSState orchestrator state. Scope: deliberately honest — stands up the SMS roles and reports state. The migration jobs (Inventory > Transfer > Cutover, identity swap) are an interactive multi-phase per-project workflow that Microsoft drives through Windows Admin Center; the menu says so plainly. Integration (9 points): loader list, Header -Action ValidateSet, 50-EntryPoint action list + StorageMigrationSetup dispatch, 48-MenuDisplay Roles & Features menu, 49-MenuRunner dispatch, 00-Initialization config block, 56-OperationsMenu Import-Defaults merge, defaults.example.json, Run-Tests.ps1 Section 164 (22 tests). Module count 69->70, action count 180->181. Completes the five Tier-1 feature modules for this cycle: Azure Arc, Defender for Endpoint, WSUS, AD CS, and Storage Migration Service. PSSA 0/0, regex harness 4759/4759, Pester 312/312.
1 parent 20730eb commit 4635d84

14 files changed

Lines changed: 412 additions & 35 deletions

Changelog.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## v1.98.62
4+
5+
New feature module: **Storage Migration Service** (module 69 — RackStack is now 70 modules).
6+
7+
`Modules/69-StorageMigration.ps1` installs Storage Migration Service (SMS), Microsoft's tool for migrating file servers — their shares, data, security, and even server identity — onto modern Windows Server.
8+
9+
**What it does:**
10+
- Installs the SMS orchestrator role (`SMS`) — the role that coordinates a migration project.
11+
- Optionally installs the SMS proxy (`SMS-Proxy`) — run on the destination Windows Server so migration data transfers locally instead of round-tripping through the orchestrator.
12+
- Reports orchestrator/proxy install state, the SMS service status, and the orchestrator state from `Get-SMSState`.
13+
- Interactive menu under **Configure Server → Roles & Features → [7] Storage Migration Service**, plus a headless CLI action `RackStack.exe -Action StorageMigrationSetup` (installs the orchestrator, and the proxy too when `StorageMigration.InstallProxy` is set).
14+
15+
**Scope (deliberately honest):** this module stands up the SMS *roles*. The migration jobs themselves — Inventory → Transfer → Cutover, including source/destination pairing and the identity-swap decision — are an interactive, multi-phase, per-project workflow that Microsoft drives through Windows Admin Center. RackStack gets SMS installed and ready; the menu states plainly that job orchestration is a WAC workflow.
16+
17+
**Config:** new `$script:StorageMigration` block in `00-Initialization.ps1` (single `InstallProxy` toggle), overridable via the new `StorageMigration` section in `defaults.example.json` (deep-merged by `Import-Defaults`).
18+
19+
**Integration:** module registered in the loader, the `-Action` ValidateSet, the CLI action list + dispatch, the Roles & Features menu, and the structural test harness (new Section 164, 22 tests). Module count references (69 → 70) and CLI-action count (180 → 181) updated across `Run-Tests.ps1`, `sync-to-monolithic.ps1`, and `README.md`. RackStack now exposes 181 CLI actions across 70 modules.
20+
21+
This completes the five Tier-1 feature modules planned for this development cycle: Azure Arc onboarding, Microsoft Defender for Endpoint onboarding, WSUS server setup, AD CS Certificate Authority bootstrap, and Storage Migration Service.
22+
323
## v1.98.61
424

525
New feature module: **AD CS Certificate Authority bootstrap** (module 68 — RackStack is now 69 modules).

Header.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
7h3 4b1d3r
3131
3232
.VERSION
33-
1.98.61
33+
1.98.62
3434
3535
.LAST UPDATED
3636
05/19/2026
@@ -1391,7 +1391,7 @@
13911391
param(
13921392
# CLI headless mode: run a specific action without interactive menus
13931393
# Usage: RackStack.exe -Action Cleanup [-Tier Standard] [-Silent] [-OutputFormat JSON]
1394-
[ValidateSet('Cleanup', 'Debloat', 'HealthCheck', 'Batch', 'QuickScan', 'Inventory', 'DriftCheck', 'Snapshot', 'Compliance', 'Harden', 'Remediate', 'Aggregate', 'Compare', 'Export', 'Trend', 'CertCheck', 'ReportHTML', 'ListeningPorts', 'SoftwareList', 'Uptime', 'ServiceAudit', 'EventAudit', 'NetInfo', 'ScheduledExport', 'ValidateConfig', 'Watch', 'Query', 'Diff', 'Baseline', 'Alert', 'FleetScan', 'PatchStatus', 'UserAudit', 'FirewallAudit', 'TaskAudit', 'DiskAudit', 'TLSAudit', 'SMBAudit', 'DriverAudit', 'TimeAudit', 'BootAudit', 'GPOAudit', 'MemoryAudit', 'ProcessAudit', 'BackupAudit', 'ShareAudit', 'DNSAudit', 'PowerAudit', 'RegistryAudit', 'ProfileAudit', 'HyperVAudit', 'NetworkAudit', 'StorageAudit', 'FeatureAudit', 'AutoStartAudit', 'BIOSAudit', 'ClusterAudit', 'AuditPolicyAudit', 'EnvAudit', 'CrashAudit', 'LocalGroupAudit', 'WMIAudit', 'TempAudit', 'UpdatePolicyAudit', 'IISAudit', 'SSHAudit', 'BitLockerAudit', 'PrintAudit', 'CredGuardAudit', 'PortAudit', 'AntivirusAudit', 'DotNetAudit', 'RDPAudit', 'VPNAudit', 'HostsFileAudit', 'NetStatAudit', 'LicenseAudit', 'USBDeviceAudit', 'AppLockerAudit', 'EventSubAudit', 'HotfixAudit', 'SysInfoAudit', 'LogonAudit', 'ACLAudit', 'RecoveryAudit', 'ServiceAccountAudit', 'ProxyAudit', 'PendingRebootAudit', 'PageFileAudit', 'CPUAudit', 'DefenderExclusionAudit', 'KerberosAudit', 'DHCPAudit', 'NUMAAudit', 'SymlinkAudit', 'StartupScriptAudit', 'SecureChannelAudit', 'ComObjectAudit', 'FirewallLogAudit', 'ScheduledRebootAudit', 'PowerShellAudit', 'RouteTableAudit', 'TokenPrivilegeAudit', 'WindowsCapabilityAudit', 'ARPTableAudit', 'LocaleAudit', 'TaskHistoryAudit', 'NTFSAudit', 'Win11Cleanup', 'DarkMode', 'LightMode', 'iSCSIAudit', 'NICTeamAudit', 'SMBSessionAudit', 'WindowsUpdateAudit', 'ClusterQuorumAudit', 'S2DAudit', 'VirtualSwitchAudit', 'MPIOPathAudit', 'ServiceRecoveryAudit', 'VMOvercommitAudit', 'DedupAudit', 'ClusterNetworkAudit', 'ReplicaLagAudit', 'HandleLeakAudit', 'ShadowCopyAudit', 'QoSPolicyAudit', 'LiveMigrationAudit', 'DomainTrustAudit', 'DiskLatencyAudit', 'NICOffloadAudit', 'StorageTimeoutAudit', 'EventLogCapacityAudit', 'TcpSettingsAudit', 'WinRMAudit', 'ClusterHealthScore', 'VMInventoryExport', 'VMSnapshotAudit', 'StorageHealthScore', 'CSVSpaceAudit', 'SMBConnectionAudit', 'VolumeLabelAudit', 'NICErrorAudit', 'VMResourceWaste', 'HealthDashboard', 'SCCMClientAudit', 'SCOMAgentAudit', 'WACConnectivityAudit', 'AzureADAudit', 'ServerScore', 'FleetReport', 'PasswordPolicy', 'FirewallRuleAudit', 'GPResultAudit', 'DNSCacheAudit', 'TPMAudit', 'SecureBootAudit', 'TimeSkewAudit', 'NetworkProfileAudit', 'InsecureServiceAudit', 'SelfTest', 'CheckForUpdate', 'ExportLogs', 'UpdateSelf', 'Rollback', 'ScheduleUpdateCheck', 'Dashboard', 'History', 'Replay', 'AzureArcEnroll', 'DefenderEndpointOnboard', 'WSUSSetup', 'ADCSSetup')]
1394+
[ValidateSet('Cleanup', 'Debloat', 'HealthCheck', 'Batch', 'QuickScan', 'Inventory', 'DriftCheck', 'Snapshot', 'Compliance', 'Harden', 'Remediate', 'Aggregate', 'Compare', 'Export', 'Trend', 'CertCheck', 'ReportHTML', 'ListeningPorts', 'SoftwareList', 'Uptime', 'ServiceAudit', 'EventAudit', 'NetInfo', 'ScheduledExport', 'ValidateConfig', 'Watch', 'Query', 'Diff', 'Baseline', 'Alert', 'FleetScan', 'PatchStatus', 'UserAudit', 'FirewallAudit', 'TaskAudit', 'DiskAudit', 'TLSAudit', 'SMBAudit', 'DriverAudit', 'TimeAudit', 'BootAudit', 'GPOAudit', 'MemoryAudit', 'ProcessAudit', 'BackupAudit', 'ShareAudit', 'DNSAudit', 'PowerAudit', 'RegistryAudit', 'ProfileAudit', 'HyperVAudit', 'NetworkAudit', 'StorageAudit', 'FeatureAudit', 'AutoStartAudit', 'BIOSAudit', 'ClusterAudit', 'AuditPolicyAudit', 'EnvAudit', 'CrashAudit', 'LocalGroupAudit', 'WMIAudit', 'TempAudit', 'UpdatePolicyAudit', 'IISAudit', 'SSHAudit', 'BitLockerAudit', 'PrintAudit', 'CredGuardAudit', 'PortAudit', 'AntivirusAudit', 'DotNetAudit', 'RDPAudit', 'VPNAudit', 'HostsFileAudit', 'NetStatAudit', 'LicenseAudit', 'USBDeviceAudit', 'AppLockerAudit', 'EventSubAudit', 'HotfixAudit', 'SysInfoAudit', 'LogonAudit', 'ACLAudit', 'RecoveryAudit', 'ServiceAccountAudit', 'ProxyAudit', 'PendingRebootAudit', 'PageFileAudit', 'CPUAudit', 'DefenderExclusionAudit', 'KerberosAudit', 'DHCPAudit', 'NUMAAudit', 'SymlinkAudit', 'StartupScriptAudit', 'SecureChannelAudit', 'ComObjectAudit', 'FirewallLogAudit', 'ScheduledRebootAudit', 'PowerShellAudit', 'RouteTableAudit', 'TokenPrivilegeAudit', 'WindowsCapabilityAudit', 'ARPTableAudit', 'LocaleAudit', 'TaskHistoryAudit', 'NTFSAudit', 'Win11Cleanup', 'DarkMode', 'LightMode', 'iSCSIAudit', 'NICTeamAudit', 'SMBSessionAudit', 'WindowsUpdateAudit', 'ClusterQuorumAudit', 'S2DAudit', 'VirtualSwitchAudit', 'MPIOPathAudit', 'ServiceRecoveryAudit', 'VMOvercommitAudit', 'DedupAudit', 'ClusterNetworkAudit', 'ReplicaLagAudit', 'HandleLeakAudit', 'ShadowCopyAudit', 'QoSPolicyAudit', 'LiveMigrationAudit', 'DomainTrustAudit', 'DiskLatencyAudit', 'NICOffloadAudit', 'StorageTimeoutAudit', 'EventLogCapacityAudit', 'TcpSettingsAudit', 'WinRMAudit', 'ClusterHealthScore', 'VMInventoryExport', 'VMSnapshotAudit', 'StorageHealthScore', 'CSVSpaceAudit', 'SMBConnectionAudit', 'VolumeLabelAudit', 'NICErrorAudit', 'VMResourceWaste', 'HealthDashboard', 'SCCMClientAudit', 'SCOMAgentAudit', 'WACConnectivityAudit', 'AzureADAudit', 'ServerScore', 'FleetReport', 'PasswordPolicy', 'FirewallRuleAudit', 'GPResultAudit', 'DNSCacheAudit', 'TPMAudit', 'SecureBootAudit', 'TimeSkewAudit', 'NetworkProfileAudit', 'InsecureServiceAudit', 'SelfTest', 'CheckForUpdate', 'ExportLogs', 'UpdateSelf', 'Rollback', 'ScheduleUpdateCheck', 'Dashboard', 'History', 'Replay', 'AzureArcEnroll', 'DefenderEndpointOnboard', 'WSUSSetup', 'ADCSSetup', 'StorageMigrationSetup')]
13951395
[string]$Action,
13961396

13971397
[ValidateSet('Light', 'Standard', 'Aggressive')]

Modules/00-Initialization.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ $script:ADCS = @{
184184
ValidityYears = 10 # Root CA certificate validity (1-25 years)
185185
}
186186

187+
# Storage Migration Service (override via defaults.json "StorageMigration")
188+
# InstallProxy controls whether the StorageMigrationSetup CLI action also
189+
# installs the SMS-Proxy feature (run the proxy on the destination server).
190+
$script:StorageMigration = @{
191+
InstallProxy = $false # Also install SMS-Proxy when running StorageMigrationSetup
192+
}
193+
187194
# Folder file cache - keyed by folder path, each entry has Files array and CacheTime
188195
$script:FileCache = @{}
189196

@@ -218,7 +225,7 @@ if (-not $PSCommandPath -and $script:ScriptPath) {
218225
if (-not $script:ModuleRoot -and $script:ScriptPath) {
219226
$script:ModuleRoot = [System.IO.Path]::GetDirectoryName($script:ScriptPath)
220227
}
221-
$script:ScriptVersion = "1.98.61"
228+
$script:ScriptVersion = "1.98.62"
222229
$script:ScriptStartTime = Get-Date
223230

224231
# Post-update cleanup: UpdateSelf / Rollback leave a `.pending-delete` sibling next to RackStack.exe.

Modules/48-MenuDisplay.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ function Show-RolesFeaturesMenu {
393393
} -CacheSeconds 120
394394
$adcsColor = if ($adcsStatusText -eq "CA configured") { "Success" } elseif ($adcsStatusText -eq "CA config needed") { "Warning" } else { "Warning" }
395395

396+
$smsStatusText = Get-CachedValue -Key "SMSState" -FetchScript {
397+
$sm = Get-SMSStatus
398+
if ($sm.OrchestratorInstalled) { "Installed" } else { "Not Installed" }
399+
} -CacheSeconds 120
400+
$smsColor = if ($smsStatusText -eq "Installed") { "Success" } else { "Warning" }
401+
396402
Write-OutputColor "" -color "Info"
397403
Write-OutputColor " ╔════════════════════════════════════════════════════════════════════════╗" -color "Info"
398404
Write-OutputColor "$((" ROLES & FEATURES").PadRight(72))" -color "Info"
@@ -406,6 +412,7 @@ function Show-RolesFeaturesMenu {
406412
Write-MenuItem "[4] Install $($script:AgentInstaller.ToolName) Agent" -Status $agentStatus -StatusColor $agentColor
407413
Write-MenuItem "[5] WSUS Update Server ►" -Status $wsusStatusText -StatusColor $wsusColor
408414
Write-MenuItem "[6] Certificate Services (AD CS) ►" -Status $adcsStatusText -StatusColor $adcsColor
415+
Write-MenuItem "[7] Storage Migration Service ►" -Status $smsStatusText -StatusColor $smsColor
409416
Write-OutputColor " └────────────────────────────────────────────────────────────────────────┘" -color "Info"
410417
Write-OutputColor "" -color "Info"
411418
Write-OutputColor " [B] ◄ Back to Server Config" -color "Info"

Modules/49-MenuRunner.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,10 @@ function Start-Show-RolesFeaturesMenu {
232232
"4" { Install-Agent }
233233
"5" { Show-WSUSManagement }
234234
"6" { Show-ADCSManagement }
235+
"7" { Show-StorageMigrationManagement }
235236
"back" { return }
236237
default {
237-
Write-OutputColor " Invalid choice. Enter 1-6 or B." -color "Error"
238+
Write-OutputColor " Invalid choice. Enter 1-7 or B." -color "Error"
238239
Start-Sleep -Milliseconds 500
239240
}
240241
}

Modules/50-EntryPoint.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ function Assert-Elevation {
398398
@{ Action = 'DefenderEndpointOnboard'; Description = 'Onboard this server to Microsoft Defender for Endpoint (runs the onboarding .cmd from defaults.json DefenderEndpoint)' }
399399
@{ Action = 'WSUSSetup'; Description = 'Install + post-install + default-configure the WSUS update server (config from defaults.json WSUS)' }
400400
@{ Action = 'ADCSSetup'; Description = 'Install the AD CS role (CA configuration is interactive-only — it needs a typed confirmation)' }
401+
@{ Action = 'StorageMigrationSetup'; Description = 'Install the Storage Migration Service orchestrator role (+proxy if StorageMigration.InstallProxy is set)' }
401402
@{ Action = 'Batch'; Description = 'JSON-driven full configuration' }
402403
)
403404
if ($script:CLIOutputFormat -eq 'JSON') {
@@ -1948,6 +1949,36 @@ footer{text-align:center;color:#999;font-size:12px;padding:16px}
19481949
}
19491950
[Environment]::Exit([int](-not $adcsRole))
19501951
}
1952+
'StorageMigrationSetup' {
1953+
# Install the Storage Migration Service orchestrator role, and the
1954+
# proxy too if defaults.json StorageMigration.InstallProxy is set.
1955+
# Migration jobs themselves run interactively via Windows Admin
1956+
# Center. Exit 0 if the orchestrator role is installed.
1957+
Write-OutputColor " Installing Storage Migration Service..." -color "Info"
1958+
$smsRole = Install-SMSRole
1959+
$smsProxy = $false
1960+
if ($null -ne $script:StorageMigration -and $script:StorageMigration.InstallProxy) {
1961+
$smsProxy = Install-SMSProxy
1962+
}
1963+
if ($smsRole) {
1964+
Write-OutputColor " SMS roles installed. Drive migration jobs from Windows Admin Center." -color "Info"
1965+
}
1966+
if ($script:CLIOutputFormat -eq 'JSON') {
1967+
$smsStatus = Get-SMSStatus
1968+
$jsonResult = @{
1969+
Tool = $script:ToolFullName
1970+
Version = $script:ScriptVersion
1971+
Action = 'StorageMigrationSetup'
1972+
Timestamp = (Get-Date -Format "yyyy-MM-ddTHH:mm:ss")
1973+
Hostname = $env:COMPUTERNAME
1974+
Success = [bool]$smsRole
1975+
OrchestratorInstalled = [bool]$smsStatus.OrchestratorInstalled
1976+
ProxyInstalled = [bool]$smsStatus.ProxyInstalled
1977+
}
1978+
Write-Output ($jsonResult | ConvertTo-Json -Depth 10)
1979+
}
1980+
[Environment]::Exit([int](-not $smsRole))
1981+
}
19511982
'Batch' {
19521983
if (-not $script:CLIConfig) {
19531984
Write-OutputColor " ERROR: -Action Batch requires -Config <path>" -color "Error"

Modules/56-OperationsMenu.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,21 @@ function Import-Defaults {
11041104
}
11051105
}
11061106

1107+
# Update Storage Migration Service settings (deep-merge from defaults.json "StorageMigration")
1108+
$acSms = $merged.StorageMigration
1109+
if ($acSms) {
1110+
if ($acSms -is [PSCustomObject]) {
1111+
foreach ($prop in $acSms.PSObject.Properties) {
1112+
if ($script:StorageMigration.ContainsKey($prop.Name)) { $script:StorageMigration[$prop.Name] = $prop.Value }
1113+
}
1114+
}
1115+
elseif ($acSms -is [hashtable]) {
1116+
foreach ($key in $acSms.Keys) {
1117+
if ($script:StorageMigration.ContainsKey($key)) { $script:StorageMigration[$key] = $acSms[$key] }
1118+
}
1119+
}
1120+
}
1121+
11071122
# Import custom license keys from merged defaults (supports company + personal)
11081123
$script:CustomKMSKeys = @{}
11091124
$script:CustomAVMAKeys = @{}

0 commit comments

Comments
 (0)