• /r/powershell
  • Get-ADGroup Pipeline questions

    Hi, I’m trying to do a batch setting of some group descriptions in AD so they match the name. I’ve been trying to figure out why $_.Name doesn’t pass through to the Set-ADGroup command though. Is there something I’m missing? get-adgroup -filter{Name -like “Foo*”} -SearchBase “OU=Floor,OU=SCCM,OU=Company,DC=Company2,DC=test” | Set-ADGroup -Description $_.Name submitted by /u/torontojc [link] [comments]

  • /r/powershell
  • new-item issue when creating directory

    im trying to create a new directory but use a variable in my creation so right now I have: new-item “D:temppst”+($mbx.alias) -type directory this fails saying it doesnt like the argument ‘+’ but if I try just “D:temppst”+($mbx.alias) I get what im looking for: d:temppstjohn.doe I figure i’m doing something really simple wrong Thanks in […]