PDrive Validation Status Documentation
From: Veera Bharat BhushanKaveri
Introduction: Let’sexplore aneasywayto dothe PDrives validationstatusavailableornotafter
the final data restorationgetscompletedtoyourlocal networkpathusingPSbyjust following
the belowsimple steps.
1. Firstlycreate yourO365 Dev TenantAdminCredentials.
2. Create the PendingUsers.csvfile inthe givenbelow formatwiththe givenheadingandmention
all the User Account namesforverifying:-
3. Similarlymake sure thatyourUsersfolderhasall the Data Restorationdone sothatindividual
Personal Drivesare availablefortheirrespective UserAccountsasmentionedbelow:-
PDrive Validation Status Documentation
4. Please make use of the belowScriptforPDrive Validation[save itwith.ps1extensiononly] and
gettingthe Outputof themper UserAccount as mentionedbelow.Alsodoyourrespective File
paths,InputCSV file pathsandOutputFile pathsconfigurationasperyourmachine Files
location.
$Admin= "Veera@abcltdnew.onmicrosoft.com”
$AdminPassword="*********"
$Directory= "abcltdnew.onmicrosoft.com"
$CsvFilePath ="E:CHG156539PSDevelopmentZonePendingUsers1.csv"
# Create a PowerShell connectiontomydirectory
$SecPass= ConvertTo-SecureString$AdminPassword -AsPlainText-Force
$Cred = New-ObjectSystem.Management.Automation.PSCredential ($Admin,$SecPass)
Connect-AzureAD-Credential $cred
#Connect-AzureAD–Credentials(Get-Credential)
# Importthe csv file
$NewUsers= import-csv -Path$CsvFilePath
$UPNobjects= $NewUsers.'UserName'|select-object
$folderFlag='No'
$result= @()
PDrive Validation Status Documentation
ForEach ($UPNTempin$UPNobjects)
{
$FolderPath= "E:CHG156539PSDevelopmentZoneUsers"+$UPNTemp | select-object
# FolderPathValidation
If(Test-Path-Path$FolderPath -PathType Container)
{
$folderflag='Yes'
}
else
{
$folderflag='No'
}
Write-HostUsername is$UPNTempData RestorationStatus$folderflag|select-object
$ExportItem= New-ObjectPSObject
$ExportItem| Add-Member-MemberTypeNoteProperty -name "User"-value$UPNTemp
$ExportItem| Add-Member-MemberTypeNoteProperty -name "FolderStatus"-value
$folderFlag
$result+= $ExportItem
}
$result| Export-Csv -Path"E:CHG156539PSDevelopmentZonePDriveValidationOutput.csv"-
NoTypeInformation
Pause
5. Run the above updatedPowerShell scriptasdescribedbelow:-
PDrive Validation Status Documentation
6. PressEnterto Continue asshownbelow:-
7. Checkthe Outputat the mentionedlocationanduse itforfurtheranalysisandproceedings:-
PDrive Validation Status Documentation
All FilesZippedhere:
PDrive Validation.zip
Conclusion:We got a simple overview of findingif the P Driveshave beenrestoredfolderwise
inthe givenpathperUser Accountas explainedinthe above steps!

PDrive Validation Status Documentation

  • 1.
    PDrive Validation StatusDocumentation From: Veera Bharat BhushanKaveri Introduction: Let’sexplore aneasywayto dothe PDrives validationstatusavailableornotafter the final data restorationgetscompletedtoyourlocal networkpathusingPSbyjust following the belowsimple steps. 1. Firstlycreate yourO365 Dev TenantAdminCredentials. 2. Create the PendingUsers.csvfile inthe givenbelow formatwiththe givenheadingandmention all the User Account namesforverifying:- 3. Similarlymake sure thatyourUsersfolderhasall the Data Restorationdone sothatindividual Personal Drivesare availablefortheirrespective UserAccountsasmentionedbelow:-
  • 2.
    PDrive Validation StatusDocumentation 4. Please make use of the belowScriptforPDrive Validation[save itwith.ps1extensiononly] and gettingthe Outputof themper UserAccount as mentionedbelow.Alsodoyourrespective File paths,InputCSV file pathsandOutputFile pathsconfigurationasperyourmachine Files location. $Admin= "Veera@abcltdnew.onmicrosoft.com” $AdminPassword="*********" $Directory= "abcltdnew.onmicrosoft.com" $CsvFilePath ="E:CHG156539PSDevelopmentZonePendingUsers1.csv" # Create a PowerShell connectiontomydirectory $SecPass= ConvertTo-SecureString$AdminPassword -AsPlainText-Force $Cred = New-ObjectSystem.Management.Automation.PSCredential ($Admin,$SecPass) Connect-AzureAD-Credential $cred #Connect-AzureAD–Credentials(Get-Credential) # Importthe csv file $NewUsers= import-csv -Path$CsvFilePath $UPNobjects= $NewUsers.'UserName'|select-object $folderFlag='No' $result= @()
  • 3.
    PDrive Validation StatusDocumentation ForEach ($UPNTempin$UPNobjects) { $FolderPath= "E:CHG156539PSDevelopmentZoneUsers"+$UPNTemp | select-object # FolderPathValidation If(Test-Path-Path$FolderPath -PathType Container) { $folderflag='Yes' } else { $folderflag='No' } Write-HostUsername is$UPNTempData RestorationStatus$folderflag|select-object $ExportItem= New-ObjectPSObject $ExportItem| Add-Member-MemberTypeNoteProperty -name "User"-value$UPNTemp $ExportItem| Add-Member-MemberTypeNoteProperty -name "FolderStatus"-value $folderFlag $result+= $ExportItem } $result| Export-Csv -Path"E:CHG156539PSDevelopmentZonePDriveValidationOutput.csv"- NoTypeInformation Pause 5. Run the above updatedPowerShell scriptasdescribedbelow:-
  • 4.
    PDrive Validation StatusDocumentation 6. PressEnterto Continue asshownbelow:- 7. Checkthe Outputat the mentionedlocationanduse itforfurtheranalysisandproceedings:-
  • 5.
    PDrive Validation StatusDocumentation All FilesZippedhere: PDrive Validation.zip Conclusion:We got a simple overview of findingif the P Driveshave beenrestoredfolderwise inthe givenpathperUser Accountas explainedinthe above steps!