{"id":297,"date":"2018-12-14T20:41:53","date_gmt":"2018-12-14T20:41:53","guid":{"rendered":"http:\/\/certcent.io\/?p=297"},"modified":"2018-12-14T20:41:53","modified_gmt":"2018-12-14T20:41:53","slug":"windows-2016-server-70-742-powershell-commands","status":"publish","type":"post","link":"https:\/\/certcent.io\/index.php\/2018\/12\/14\/windows-2016-server-70-742-powershell-commands\/","title":{"rendered":"Windows Server 2016 &#8211; 70-742 Powershell commands"},"content":{"rendered":"<p>Here&#8217;s a list of common Powershell Commands you might use or see on the 70-742 exam:<br \/>\n<strong>Install ADDS<\/strong><\/p>\n<pre class=\"lang:default decode:true\" title=\"Installing ADDS\">Install-WindowsFeature AD-Domain-Services\nntdsutil: Activate instance ntds, ifm, create sysvol full c:\\ifm\nInstall-ADDSDomainController -InstallationMediaPath c:\\ifm\nCloning:\nGet-ADDCCloneingExcludedApplicationList -GenerateXML\nNew-ADDCCloneConfigFile\nSeizing Roles:\n0 - PDC, 1 - RID, 2 - Infrastructure, 3 - Schema, 4 - Domain naming master\nMove-ADDirectoryServerOperationMasterRole -Identity \"Server\" -OperationMasterRole\nPDCEmulator 0,1,2 -Force\nTroubleshooting:\nnslookup, set type=all, _ldap._tcp.dc_msdcs.domain.com\nMove-ADObject -Identity 'cn=admin,ou=users,dc=domain,dc=com' -TargetPath\n'ou=marketing,dc=domain,dc=com'\nNew-ADuser, Set-ADUser, Remove-ADUser, Set-ADAaccountPassword, Set-ADAccountExpiration,\nUnlock-ADAcount, Enable-ADAccount, Disable-ADDaccount\nNew-ADComputer, Get-ADComputer, Set-ADComputer, Remove-ADComputer, Test-ComputerSecureChannel, Reset-ComputerMachinePassword\ndjoin \/Provision \/Domain \/ Machine \/SaveFile\ndjoin \/requestOOJ \/loadfile c:\\client.txt \/windowspath c:\\Windows \/Localos\nNew-ADGroup, Set-ADGroup, Get-ADGroup, Remove-ADGroup, Add-ADGroupMember, Remove-ADGroupMember,\nAdd-ADGroupMember, Get-ADGroupMember, Remove-ADGroupMember, Add-ADPrincipalGroupMemberShip,\nGet-ADPrincipalGroupMembership, Remove-ADPrincipalGroupMembership\nOrganizational Units\nNew-ADOrganizationUnit, Set-ADOrganizationalUnit, Get-ADOrganizationalUnit,\nRemove-ADOrganizationalUnit<\/pre>\n<p><strong>Manage ADDS<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"Manage ADDS\">Create and configure Service Accounts - The New Way\nNew-ADServiceAccount -Name IIS-QMSA -DNSHostname server.domain.com -PrincipalAllowedToRetrieveManagedPassword Server1$\nAdd-ADComputerServiceAccount -identity server-dc1 -ServiceAccount IIS-QMSA\nInstall-ADServiceAccount -Identity IIS-QMSA\nSPNs\nsetspn -A WebService\/server.domain.com:443 iis-qmsa\nKerberos Constrained Delegation\nSet-ADComputer server -PrincipalsAllowedToDelegateToAccount $computer\nPassword Policies\nNew-ADFineGrainedPasswordPolicy Admins\nAdd-ADFineGrainedPasswordPolicySubject Admins -Subjects \"Secure Admins\"\nADDS Compacting DB\nntdsutil: activate instance NTDS, Files, Compact to C:\\, Integrity, Quit, Quit,\nCopy c:\\ntds.dit C:\\Windows\\NTDS\\ntds.dit, Del c:\\Windows\\NTDS\\*.log, Exit\nViewing Snap shot of ADSI\nActivate instance NTDS, snapshot, create, list all, quit\nActivate instance NTDS, snapshot, List all, mount &lt;guid&gt;, quit, quit\ndsamain -dbpath c:\\$snap_path -ldapport 50000\nViewing Mount:\nServer Manager, domain controller, server:50000\nTroubleshooting:\nDCDiag, RepAdmin,\nGet-ADReplicationConnection, Get-ADReplicationFailure, Get-ADReplicationPartnerMetaData,\nGet-ADReplicationSite, Get-ADReplicationSiteLink, Get-ADREplicationSiteLinkBridge,\nGet-ADReplicationSubnet\nNew-ADReplicationSite -Name \"Seattle\"\nRecycle Bin\nEnable-ADOptionalFeature -Identity 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target 'domain.com' -Server server<\/pre>\n<p><strong>Group Policy<br \/>\n<\/strong><\/p>\n<pre class=\"lang:default decode:true \" title=\"Group Policy from the command line\">New-GPLink -Name \"Managers\" -target \"ou=IT, dc=domanin,dc=com\"\nNew-Gpo -Name \"Managers\" | New-GPLink -target \"ou=IT, dc=domain,dc=com\" -LinkEnabled Yes\nBackup and Restore GPO\nBackup-Gpo -All -Path C:\\GPOBackup\nBackup-Gpo -Name \"Managers\" - Path C:\\GPOBackup -Comment \"Weekly Backup\"\nRestore-Gpo -Name \"Managers\" -Path C:\\GPOBackup\nImport-Gpo -BackupGpoName \"Managers\" -TargetName \"IT Managers\" -Path C:\\GPOBackup\nCopy-Gpo -SourceName \"IT Managers\" -TargetName \"Managers\"\nInvoke-GPUpdate<\/pre>\n<p><strong>Certificates<\/strong><\/p>\n<pre class=\"lang:default decode:true  \" title=\"Certification management commands and Powershell\">Install-AdcsCertificationAuthority, Install-AdcsEnrollmentWebService, Install-AdcsEnrollmentPolicyWebService,\nInstall-AdcsWebEnrollment, Install-AdcsNetworkDeviceEnrollmentService,InstallAdcsOnlineResponder\nInstall-AdcsCertificationAuthority -CAType EnterpriseRootCA -IncludeManagementTools\nCertutil -Backup  C:\\Backup\nCertutil -Restore C:\\Backup\n<\/pre>\n<p><strong>ADFS<\/strong><\/p>\n<pre class=\"lang:default decode:true\" title=\"Installing and Configuring AD FS\">Installing and configuring AD FS\nImplementing Web Proxy Server\nInstalling and Configure RDMS\nInstall-WindowsFeature ADFS-Federation -IncludeManagementTools\nInstall-ADFSFarm -CertificateThumbprint \"keycodestring\" -FederationServiceName\nFour.domain.com -GroupServiceAccountIdentifier domain.com\\administrator\nImplement Web Application Proxy as AD FS Proxy\n  Web And MSOFBA Used by Microsoft Office app\n  HTTP Basic Used by Exchange ActiveSync clients\n  OAuth2 Supported by Windows Store app\nInstall and Configure AD RMS\nInstall-WindowsFeature ADRMS -IncludeManagementTools\nServer, Client, Apps, DB, PKI\n<\/pre>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a list of common Powershell Commands you might use or see on the 70-742 exam: Install ADDS Install-WindowsFeature AD-Domain-Services ntdsutil: Activate instance ntds, ifm, create sysvol full c:\\ifm Install-ADDSDomainController -InstallationMediaPath c:\\ifm Cloning: Get-ADDCCloneingExcludedApplicationList -GenerateXML New-ADDCCloneConfigFile Seizing Roles: 0 &#8211; PDC, 1 &#8211; RID, 2 &#8211; Infrastructure, 3 &#8211; Schema, 4 &#8211; Domain naming master&hellip; <a class=\"more-link\" href=\"https:\/\/certcent.io\/index.php\/2018\/12\/14\/windows-2016-server-70-742-powershell-commands\/\">Continue reading <span class=\"screen-reader-text\">Windows Server 2016 &#8211; 70-742 Powershell commands<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/posts\/297"}],"collection":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/comments?post=297"}],"version-history":[{"count":0,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/posts\/297\/revisions"}],"wp:attachment":[{"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/categories?post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/certcent.io\/index.php\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}