Please follow the PDrive Validation Status Documentation process document step by step, that is available in the Zip file and use the Input files templates as required for your required Output.
Firstly, create your O365 Dev Tenant Admin Credentials.
Create the PendingUsers.csv file in the given below format with the given heading and mention all the User Account names for verifying.
Similarly, make sure that your Users folder has all the Data Restoration done so that the individual Personal Drives are available for their respective User Accounts as mentioned below.
Please make use of the below script for PDrive Validation[save it with .ps1 extension only] and getting the Output of them per User Account as mentioned below. Also, do your respective File paths, Input CSV file paths and Output File paths configuration as per your machine Files location.
- $Admin = "[email protected]"
- $AdminPassword = "*******"
- $Directory = "abcltdnew.onmicrosoft.com"
-
- $CsvFilePath = "E:\CHG156539\PSDevelopmentZone\PendingUsers1.csv"
-
- # Create a PowerShell connection to my directory
- $SecPass = ConvertTo-SecureString $AdminPassword -AsPlainText -Force
- $Cred = New-Object System.Management.Automation.PSCredential ($Admin, $SecPass)
- Connect-AzureAD -Credential $cred
- #Connect-AzureAD –Credentials (Get-Credential)
-
- # Import the csv file
- $NewUsers = import-csv -Path $CsvFilePath
- $UPNobjects = $NewUsers.'User Name'| select-object
- $folderFlag = 'No'
-
- $result = @()
-
- ForEach ($UPNTemp in $UPNobjects)
- {
- $FolderPath = "E:\CHG156539\PSDevelopmentZone\Users\" + $UPNTemp | select-object
-
- # FolderPath Validation
- If(Test-Path -Path $FolderPath -PathType Container)
- {
-
- $folderflag = 'Yes'
- }
- else
- {
- $folderflag = 'No'
- }
-
- Write-Host Username is $UPNTemp Data Restoration Status $folderflag | select-object
-
- $ExportItem = New-Object PSObject
- $ExportItem | Add-Member -MemberType NoteProperty -name "User" -value $UPNTemp
- $ExportItem | Add-Member -MemberType NoteProperty -name "FolderStatus" -value $folderFlag
- $result += $ExportItem
- }
-
- $result | Export-Csv -Path "E:\CHG156539\PSDevelopmentZone\PDriveValidationOutput.csv" -NoTypeInformation
Run the above updated PowerShell script as described below,
Press Enter to continue as shown below,
Check the output at the mentioned location and use it for further analysis and proceedings.
You can use it for your PreCheckScanning before starting the migration jobs only after you get the confirmation that the User Accounts Data Restoration is completed in the form of Personal Drives.
That's all for today. Have a great day:)