How to prompt for user input inside Powershell? -
i want prompt user input in "groupname"
. possible?
get-adgroup -filter {name -like "*groupname*"} | select name
$groupname = read-host "group name" get-adgroup -filter { name -like $groupname } | select name
edit after comment:
get-adgroup -filter { name -like "*$($groupname)*" } | select name
Comments
Post a Comment