Hello Guys,
I did a script where I can list all items from a SharePoint site
I want to exclude some kind of files (ex: PNG, PDF, etc)
$SystemItem =@(".PDF", ".PNG")
$Item = $ListItems | Where {$_["FileLeafRef"] -notlike $SystemItem}
this command is not working, I keep receiving pdf's and png's files
If I change the variable $SystemItem to $SystemItem =@("*.pdf"), the script runs perfectly, any pdf's files show up
once I use the variable $SystemItem as an Array it doesn't work
Anyone knows How can I use "-notlike" with arrays?
Thank you so much
Cheers