$DepartmentId = (Get-PnPListItem -List "DepartmentList" -Query "<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>$Department</Value></Eq></Where ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results