The Case for Automation
Manual profile migrations are time-consuming and error-prone. When you are dealing with more than a handful of workstations, clicking through the ProfWiz GUI on each machine is impractical. ProfWiz's robust command-line interface (CLI) was designed precisely for this β it exposes every migration capability as a parameter so you can wrap it in batch files, PowerShell scripts, SCCM task sequences, or Ansible playbooks.
ProfWiz Command-Line Reference
The core ProfWiz executable (ProfWiz.exe) accepts the following key parameters:
/domain:DOMAINNAMEβ the target Active Directory domain/user:usernameβ the target domain username/MigrateLocalProfileβ migrates the local profile to the domain account/Silentβ suppresses all GUI dialogs (required for unattended operation)/Log:C:\path o\logfile.logβ writes a detailed migration log/ProfileDir:C:\custom\pathβ use when the profile is in a non-default location/Rebootβ automatically reboots after a successful migration/NoRebootβ suppresses the reboot prompt
Batch Script: Single Machine Migration
The simplest automation is a batch file placed on the workstation:
@echo off
echo Starting profile migration...
ProfWiz.exe /domain:CONTOSO /user:%1 /MigrateLocalProfile /Silent /Log:C:\Windows\Temp\profwiz.log /Reboot
echo Migration initiated. Check log at C:\Windows\Temp\profwiz.log
Call this with: migrate.bat johndoe where johndoe is the domain username.
PowerShell Script: Bulk Migration from CSV
For fleet-wide migrations, maintain a CSV mapping file:
# mapping.csv
LocalUser,DomainUser,ComputerName
jsmith,john.smith,DESKTOP-001
mmiller,mary.miller,LAPTOP-042
Then use this PowerShell script to drive ProfWiz remotely:
= Import-Csv "\fileserver\migration\mapping.csv"
= "\fileserver ools\ProfWiz.exe"
= "\fileserver\migration-logs"
foreach ( in ) {
= .ComputerName
= .DomainUser
Write-Host "Processing -> "
Invoke-Command -ComputerName -ScriptBlock {
param(, , )
Start-Process -FilePath `
-ArgumentList "/domain:CONTOSO /user: /MigrateLocalProfile /Silent /Log: /NoReboot" `
-Verb RunAs -Wait
} -ArgumentList , , "$computer.log"
}
This script loops through every row in the CSV, connects to the remote machine via PowerShell remoting, and executes ProfWiz silently. Logs are written to a central share for easy review.
SCCM Task Sequence Integration
If your environment uses Microsoft Endpoint Configuration Manager (SCCM / MECM), ProfWiz integrates cleanly as a task sequence step:
- Add ProfWiz.exe and your mapping CSV to an SCCM package
- Create a new task sequence and add a Run Command Line step
- Command:
ProfWiz.exe /domain:CONTOSO /user:%NewDomainUser% /MigrateLocalProfile /Silent /Log:%_SMSTSLogPath%\profwiz.log - Set the task variable
NewDomainUserusing a preceding script that queries your mapping database - Deploy the task sequence to the target collection
Group Policy Startup Script
For environments without SCCM, a Group Policy startup script achieves similar results:
- Place ProfWiz.exe and the migration batch file in SYSVOL
- Create a GPO linked to the OU containing the workstations to be migrated
- Under Computer Configuration > Windows Settings > Scripts > Startup, add the batch file
- The script runs at machine startup with SYSTEM privileges β sufficient for ProfWiz
- Disable the GPO link after migration is complete to prevent re-running
Error Handling in Scripts
ProfWiz returns exit codes that scripts can check:
0β success1β migration failed (check log for details)2β profile not found3β domain account not found
In PowerShell, capture and act on the exit code:
if ( -eq 0) {
Write-Host "Migration succeeded on "
} else {
Write-Warning "Migration failed on (exit code )"
}
Testing Before Production
Always test your automation scripts in a lab environment with virtual machines before running against production workstations. Validate that the CSV mapping is correct, the script reaches the target machines, and the log files are created and populated.
Conclusion
Automating profile migrations with ProfWiz scripts transforms a week of manual work into an overnight operation that runs without administrator intervention. Whether you use batch files, PowerShell, SCCM, or Group Policy, ProfWiz's CLI gives you the control you need to migrate hundreds of profiles reliably and consistently.