{"action":"closed","issue":{"url":"https://api.github.com/repos/cgeorgewilliam83/Geo/issues/1","labels_url":"https://api.github.com/repos/cgeorgewilliam83/Geo/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cgeorgewilliam83/Geo/issues/1/comments","events_url":"https://api.github.com/repos/cgeorgewilliam83/Geo/issues/1/events","html_url":"https://github.com/cgeorgewilliam83/Geo/issues/1","id":99992826,"number":1,"title":"Untitiledtask","user":{"login":"cgeorgewilliam83","id":13069369,"avatar_url":"https://avatars.githubusercontent.com/u/13069369?v=3","gravatar_id":"","url":"https://api.github.com/users/cgeorgewilliam83","html_url":"https://github.com/cgeorgewilliam83","followers_url":"https://api.github.com/users/cgeorgewilliam83/followers","following_url":"https://api.github.com/users/cgeorgewilliam83/following{/other_user}","gists_url":"https://api.github.com/users/cgeorgewilliam83/gists{/gist_id}","starred_url":"https://api.github.com/users/cgeorgewilliam83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgeorgewilliam83/subscriptions","organizations_url":"https://api.github.com/users/cgeorgewilliam83/orgs","repos_url":"https://api.github.com/users/cgeorgewilliam83/repos","events_url":"https://api.github.com/users/cgeorgewilliam83/events{/privacy}","received_events_url":"https://api.github.com/users/cgeorgewilliam83/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-10T07:22:38Z","updated_at":"2015-10-23T14:34:52Z","closed_at":"2015-10-23T14:34:52Z","body":"#Win12 to join to its AD domain and Reboot\r\nAdd-Computer -DomainName DOMAIN\r\n-Restart Computer\r\n$hostname = $env:computername\r\necho \"Hostname = $hostname\" | Add-Content -Path C:\\test\\$hostname.ini\r\n# create an AD Group/user name/ it has to be the member of the group created\r\n$Computers = Get-ADComputer | Get-Content \"C:\\test\\$hostname.ini\"\r\nNew-ADGroup –name “ADGROUP” –groupscope Global \r\nAdd-AdGroupMember -Identity \"ADGROUP\" -Member Username\r\n#Add user to Remote Desktop group on remote PC for access\r\n                        $Invoke-Command -ComputerName\r\n           -ScriptBlock {$computer = $env:COMPUTERNAME\r\n                        $domain = \"DOMAIN\"\r\n                        $group = [ADSI]\"WinNT://$computername/Remote Desktop group\"\r\n                        $group.psbase.Invoke(\"add\",([ADSI]\"WinNT://$domain/Username\").Path)\r\n                        }      "}}