How to Add 2 params to -notlike


hi all;

i'm trying list off directories excluding files , 2 directories:

get-childitem -recurse -exclude *.* c:\backups | where-object {$_.name -notlike "*logshipping*" -and $_.name -notlike "*integration*"}

but, i'm receiving listo of directories named logshipping , integration

how can solve this.

tks.


view ricardo muramatsu's profile on linkedin

i solved using:

get-childitem -recurse -exclude *.*,logingshipping,integration* c:\backups

thank all.


view ricardo muramatsu's profile on linkedin


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...