21 lines
751 B
Markdown
21 lines
751 B
Markdown
## setup
|
|
|
|
You need to have the credentials present before running the script
|
|
|
|
```ps1
|
|
# Save credentials for source servers
|
|
|
|
$cred1 = Get-Credential -Message "Enter credentials for Server1"
|
|
$cred1 | Export-Clixml -Path "C:\Scripts\Credentials\server1_cred.xml"
|
|
|
|
$cred2 = Get-Credential -Message "Enter credentials for Server2"
|
|
$cred2 | Export-Clixml -Path "C:\Scripts\Credentials\server2_cred.xml"
|
|
|
|
$cred3 = Get-Credential -Message "Enter credentials for Server3"
|
|
$cred3 | Export-Clixml -Path "C:\Scripts\Credentials\server3_cred.xml"
|
|
|
|
# Save credentials for destination server (if needed)
|
|
|
|
$destCred = Get-Credential -Message "Enter credentials for Destination Server"
|
|
$destCred | Export-Clixml -Path "C:\Scripts\Credentials\destination_cred.xml"
|
|
```
|