Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • yes i tried to escape the single-quote/double quote by above method, but then the script does not proceed further and pause at following . (output) root@linux:/temp# ./test.sh + USERLIST=/tmp/adusers.list.names.only.txt + read users + cat /tmp/adusers.list.names.only.txt + num=1 ++ awk '{print $1}' ++ echo $'user1.local\r' + USR=$'user1.local\r' -Properties * | select Enabled"'ADPASS //10.0.0.1 'powershell.exe -command "import-module activedirectory; Get-ADUser user1.local afterword it does not move further Commented Feb 14, 2017 at 3:31