Forum Replies Created
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
okk thanks
help
-
This reply was modified 9 months, 2 weeks ago by
robertrobert59. Reason: testing
@rob … how do you insert a block of powershell code ?
try this
$groups = "grp1", "grp2","grp3"foreach ($group in $groups) {Get-ADGroupMember $group | Get-ADUser -Properties samaccountname, userprincipalname |Select-Object samaccountname, userprincipalname,@{n='GroupName';e={$group}}}Invoke-Command -ComputerName (get-content c:\servers.txt) -ScriptBlock {get-windowsupdate}
put your servers in a text file in c:\servers.txt
-
This reply was modified 9 months, 2 weeks ago by
robertrobert59.
-
This reply was modified 9 months, 2 weeks ago by
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)