powershell contains not working

后端 未结 4 940
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-27 00:36

I am trying filter by the name of each share using $Share.Name. However, when I try to use -contains in the if statement below, I get no r

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-27 01:18

    If you are testing $name for exactly 'admin' you can use the -eq comparator. This checks if the contents of $name equal the contents of your specified string 'admin'

提交回复
热议问题