PowerShell Command Line Conversion Guide: Active Directory Edition ACTIVE DIRECTORY CMD DCPROMO Switch CMD CSVDE CSVDE CMD DSGET DSGET DSGET DSGET DSGET DSGET DSGET DSGET DSGET DSGET CMD DSQUERY Switch i Switch computer contact subnet group ou site server user quota partition Switch computer DSQUERY DSQUERY DSQUERY DSQUERY DSQUERY DSQUERY DSQUERY contact subnet group ou site server user DSQUERY DSQUERY DSQUERY CMD DSADD DSADD DSADD DSADD DSADD DSADD CMD DSMOVE quota partition * Switch computer contact group ou user quota Switch CMD Switch http://aka.ms/PsCmdGuideAD PowerShell Cmdlet Install-ADDSForest Install-ADDSDomain Install-ADDSDomainController Uninstall-ADDSDomainController PowerShell Cmdlet Get-ADObject | Export-CSV Import-CSV | New-ADObject PowerShell Cmdlet Get-ADComputer Get-ADObject -LDAPFilter '(objectClass=contact)' Get-ADReplicationSubnet Get-ADGroup Get-ADOrganizationalUnit Get-ADReplicationSite Get-ADDomainController Get-ADUser Get-ADObject -SearchBase (Get-ADDomain).QuotasContainer -Filter * Get-ADObject -SearchBase (Get-ADForest).PartitionsContainer -LDAPFilter '(objectClass=crossRef)' PowerShell Cmdlet Get-ADComputer Search-ADAccount Get-ADObject -LDAPFilter '(objectClass=contact)' Get-ADReplicationSubnet Get-ADGroup Get-ADOrganizationalUnit Get-ADReplicationSite Get-ADDomainController Get-ADUser Search-ADAccount Get-ADObject -SearchBase (Get-ADDomain).QuotasContainer -Filter * Get-ADObject -SearchBase (Get-ADForest).PartitionsContainer -LDAPFilter '(objectClass=crossRef)' Get-ADObject PowerShell Cmdlet New-ADComputer New-ADObject -Type contact New-ADGroup New-ADOrganizationalUnit New-ADUser PowerShell Cmdlet Move-ADObject Rename-ADObject PowerShell Cmdlet v0.1 Module ADDSDeployment Version 2012 Module ActiveDirectory ActiveDirectory Module ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory Module ActiveDirectory Version 2008 R2 2008 R2 Version 2008 R2 2008 R2 2012 2008 R2 2008 R2 2012 2008 R2 2008 R2 2008 R2 2008 R2 Version 2008 R2 ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory 2008 R2 2012 2008 R2 2008 R2 2012 2008 R2 2008 R2 ActiveDirectory ActiveDirectory ActiveDirectory Module ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory 2008 R2 2008 R2 2008 R2 Version 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 Module ActiveDirectory Version 2008 R2 Module Version 1 of 4 PowerShell Command Line Conversion Guide: Active Directory Edition CMD DSMOD DSMOD DSMOD DSMOD DSMOD DSMOD DSMOD DSMOD CMD DSRM Switch computer contact group ou server user quota partition Switch CMD DSACLS Switch CMD REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN REPADMIN Switch /FailCache /Queue /ReplSingleObj /ShowConn /ShowObjMeta /ReplSummary /ShowUTDVec /SiteOptions /ShowAttr /SetAttr /PRP CMD NLTEST NLTEST NLTEST NLTEST NLTEST NLTEST NLTEST NLTEST NLTEST CMD Switch SC_RESET SC_VERIFY SC_CHANGE_PWD DCLIST DCNAME DSGETDC PARENTDOMAIN DOMAIN_TRUSTS SHUTDOWN Switch http://aka.ms/PsCmdGuideAD PowerShell Cmdlet Set-ADComputer Set-ADObject Set-ADGroup Set-ADOrganizationalUnit Set-ADObject Set-ADUser Set-ADObject Set-ADObject PowerShell Cmdlet Remove-ADComputer Remove-ADGroup Remove-ADGroupMember Remove-ADUser Remove-ADOrganizationalUnit Remove-ADObject PowerShell Cmdlet Get-ACL Set-ACL PowerShell Cmdlet Get-ADReplicationFailure Get-ADReplicationQueueOperation Sync-ADObject Get-ADReplicationConnection Get-ADReplicationAttributeMetadata Get-ADReplicationPartnerMetadata Get-ADReplicationUpToDatenessVectorTable Set-ADReplicationSite Get-ADObject Set-ADObject Get-ADDomainControllerPasswordReplicationPolicy Add-ADDomainControllerPasswordReplicationPolicy Remove-ADDomainControllerPasswordReplicationPolicy Get-ADAccountResultantPasswordReplicationPolicy Get-ADDomainControllerPasswordReplicationPolicyUsage PowerShell Cmdlet Test-ComputerSecureChannel -Repair Test-ComputerSecureChannel Reset-ComputerMachinePassword Get-ADDomainController Get-ADDomain | Select-Object PDCEmulator Get-ADDomainController (Get-WMIObject Win32_ComputerSystem).Domain Get-ADTrust Stop-Computer PowerShell Cmdlet v0.1 Module ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory Module ActiveDirectory Version 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 Version 2008 R2 Module Microsoft.PowerShell.Security Version 2008 R2 Module ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory Version 2012 2012 2012 2012 2012 2012 2012 2012 2008 R2 2008 R2 2008 R2 Module Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management ActiveDirectory ActiveDirectory ActiveDirectory Version 2012 2012 2012 2008 R2 2008 R2 2008 R2 ActiveDirectory Microsoft.PowerShell.Management Module 2012 2008 R2 Version 2 of 4 PowerShell Command Line Conversion Guide: Active Directory Edition CMD NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM NETDOM Switch ADD COMPUTERNAME JOIN MOVE RESETPWD REMOVE RENAMECOMPUTER RESET VERIFY QUERY WORKSTATION QUERY SERVER QUERY DC QUERY OU QUERY PDC QUERY FSMO NETDOM CMD GPUPDATE GPRESULT CMD QUERY TRUST Switch Switch PowerShell Cmdlet Add-Computer Rename-Computer Add-Computer Add-Computer Reset-ComputerMachinePassword Remove-Computer Rename-Computer Test-ComputerSecureChannel -Repair Test-ComputerSecureChannel Get-ADComputer -Filter "operatingSystem -notlike '*server*'" Get-ADComputer -Filter "operatingSystem -like '*server*'" Get-ADDomainController Get-ADOrganizationalUnit Get-ADDomain | Select-Object PDCEmulator Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster Get-ADDomain | Select-Object InfrastructureMaster, PDCEmulator, RIDMaster Get-ADTrust PowerShell Cmdlet Invoke-GPUpdate Get-GPResultantSetOfPolicy PowerShell Cmdlet Module Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management Microsoft.PowerShell.Management ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory ActiveDirectory Version 2012 2012 2012 2012 2012 2012 2012 2012 2012 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 2008 R2 ActiveDirectory Module GroupPolicy GroupPolicy Module 2012 Version 2012 2008 R2 Version Module Microsoft.PowerShell.Management Module NetTCPIP NetTCPIP DnsClient DnsClient DnsClient Module NetTCPIP NetTCPIP Module Version 2008 R2 Version 2012 2012 2012 2012 2012 Version 2012 2012 Version Module DNSClient Module Version 2012 Version IP CMD PING CMD IPCONFIG IPCONFIG IPCONFIG IPCONFIG IPCONFIG CMD NETSTAT NETSTAT CMD Switch Switch /ALL /FLUSHDNS /DISPLAYDNS /REGISTERDNS Switch a r Switch PowerShell Cmdlet Test-Connection PowerShell Cmdlet Get-NetIPConfiguration Get-NetIPConfiguration -Detailed Clear-DnsClientCache Get-DnsClientCashe Register-DnsClient PowerShell Cmdlet Get-NetTCPConnection Get-NetRoute PowerShell Cmdlet DNS CMD NSLOOKUP CMD Switch Switch http://aka.ms/PsCmdGuideAD PowerShell Cmdlet Resolve-DNSName PowerShell Cmdlet v0.1 3 of 4 PowerShell Command Line Conversion Guide: Active Directory Edition CMD DNSCMD DNSCMD DNSCMD DNSCMD Switch /Info /Config /EnumZones /Statistics DNSCMD DNSCMD DNSCMD /ClearCache /StartScavenging /ResetForwarders DNSCMD DNSCMD /ZoneInfo /ZoneAdd DNSCMD DNSCMD /ZoneDelete /ZoneResetScavengeServers DNSCMD DNSCMD DNSCMD /ZoneResetMasters /ZoneExport /RecordAdd DNSCMD DNSCMD DNSCMD DNSCMD DNSCMD DNSCMD CMD /RecordDelete /AgeAllRecords /ZonePrint /TrustAnchorAdd /TrustAnchorDelete /EnumTrustAnchors Switch PowerShell Cmdlet Get-DnsServer Set-DnsServer Get-DnsServerZone Get-DnsServerStatistics Clear-DnsServerStatistics Clear-DnsServerCache Start-DnsServerScavenging Get-DnsServerForwarder Set-DnsServerForwarder Add-DnsServerForwarder Remove-DnsServerForwarder Set-DnsServerConditionalForwarderZone Add-DnsServerConditionalForwarderZone Get-DnsServerZone Add-DnsServerPrimaryZone Add-DnsServerSecondaryZone Add-DnsServerStubZone Remove-DnsServerZone Get-DnsServerScavenging Set-DnsServerScavenging Set-DnsServerSecondaryZone Export-DnsServerZone Add-DnsServerResourceRecord Add-DnsServerResourceRecordA Add-DnsServerResourceRecordAAAA Add-DnsServerResourceRecordCName Add-DnsServerResourceRecordDS Add-DnsServerResourceRecordMX Add-DnsServerResourceRecordPtr Remove-DnsServerResourceRecord Set-DnsServerResourceRecordAging Get-DnsServerResourceRecord Add-DnsServerTrustAnchor Remove-DnsServerTrustAnchor Get-DnsServerTrustAnchor PowerShell Cmdlet Module DNSServer DNSServer DNSServer DNSServer Version 2012 2012 2012 2012 DNSServer DNSServer DNSServer 2012 2012 2012 DNSServer DNSServer 2012 2012 DNSServer DNSServer 2012 2012 DNSServer DNSServer DNSServer 2012 2012 2012 DNSServer DNSServer DNSServer DNSServer DNSServer DNSServer Module 2012 2012 2012 2012 2012 2012 Version DISCLAIMER This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code. This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. http://aka.ms/PsCmdGuideAD v0.1 4 of 4
© Copyright 2025 ExpyDoc