Hello powershell gurus. I'm trying to understand why I get return an error.
Text
Compare-Object : Cannot bind argument to parameter 'ReferenceObject' because it is null. Here is my code,
Powershell
# Préparation de la copie Home FolderIf(!(Test-Path$Homefolder-PathTypeContainer)){Write-Host"Dossier innexistant"New-Item-Path$BckZInter-Name"No Data.txt"Write-LogWarning"Dossier $Homefolder innexistant - Aucune Copie"}Else{Copy-WithProgress-Source$Homefolder-Destination$BckZInterWrite-LogEntry"Copie du Z:\ fait"#Si le HomeFolder Contient 0 fichier, supprimer le dossier, sans comparaisonIF((Get-ChildItem$Homefolder-Recurse).count-eq0){Write-LogEntry"$Homefolder est vide"New-Item-Path$BckZInter-Name"No Data.txt"Write-LogEntry"Suppression en cours"Remove-Item$Homefolder-ForceWrite-LogEntry...