How to administer clients on a domain using 5 common PowerShell cmdlets

System administrators who manage Windows clients must update these PowerShell cmdlets when performing common administrative tasks on their devices connected to the domain.

  Bearded computer specialists configuring servers in the data center

Image: iStockphoto / EvgeniyShkolenko

Experienced administrators have their Windows administration tasks downloaded: they probably have a variety of scripts or processes implemented to handle common problems that affect customers regularly without sweating. While many of these proven fixes work perfectly at this time, Microsoft has made it clear that the future of systems management points directly to PowerShell (PS).

By aggressively integrating, and continuing to develop, support for almost all aspects of the operating system and specialized applications that Microsoft has written, is the preferred tool for managing clients and servers in the future. So much so that Microsoft bought GitHub and made open source PowerShell, integrating the Linux Subsystem into PS (and vice versa), allowing Windows administrators to manage Linux devices and Linux administrators to manage Windows clients.

SEE: Solve IT problems quickly with these 10 PowerShell cmdlets (Free PDF) (TechRepublic)

That said, here are some common scenarios that IT you will find while driving Windows client devices and PowerShell cmdlets that can be used to solve problems when they arise. The best part? These PowerShell cmdlets can be run remotely. Note: PowerShell cmdlets may be inaccessible locally through the network; otherwise, they can be executed remotely before
enabling PowerShell Remoting from a command or through a group policy
.

How to join a device to the domain

  New-ADComputer -Name ComputerName -Server DC.DomainName.ext -Path "OU = Computers, DC = Domain, DC = ext" -Activated $ True -Restart Force [19659012] How to correct a broken trust between the devices and the domain 
  Test-ComputerSecureChannel 

If it reappears as True, the trust is intact; If it is false again, it needs to be repaired.

  Test-ComputerSecureChannel -Repair -Credential 

Sometimes the trust is fine, but the machine password is not and must be reset. The next command will achieve that.

  Reset-ComputerMachinePassword 

How to verify the replication status of Active Directory

To verify the replication status of the domain, including the last known synchronization:

  Get-ADReplicationPartnerMetadata -Target "domain.ext" - Scope Domain [19659021] To obtain a list of replication failures for a given domain controller: 

  Get-ADReplicationFailure -Target DC.DomainName.ext 

To obtain a list of failures for the forest:

  Get -ADReplicationFailure -Target DomainName .ext -Scope Forest 

How to modify the network connection settings

To establish the network configuration, we must make two cmdlets. The first one sets the IP-related configuration on the active network card:

  New-NetIPAddress -IPAddress XXX.XXX.XXX.XXX -DefaultGateway XXX.XXX.XXX.XXX -Prefixlength 24 -InterfaceIndex (Get-NetAdapter). InterfaceIndex 

The second cmdlet sets the DNS server configuration on the active network card. Multiple servers can be included when separated with commas:

  Set-DNSClientServerAddress -InterfaceIndex (Get-NetAdapter) .InterfaceIndex -ServerAddress XXX.XXX.XXX.XXX, XXX.XXX.XXX.XXX 

How to install managed Microsoft Store applications

For standalone applications:

  Add-AppxProvisionedPackage -Online -FolderPath \ path  to  server  share  file.AppxBundle 

For applications with dependencies (separated by commas):

  Add- AppxProvisionedPackage -Online -FolderPath \ path  to  server  share  file.AppxBundle -DependencyPackagePath "\ path  to  server  share  file1.Appx", "\ path  to  server  share  file1.Appx "-SkipLicense 

See also

For More Updates Check out Blog, Windows Softwares Drivers, Antivirus, Ms Office, Graphic Design Don’t Forget to Look Our Facebook Page Get Into Pc like us & follow on Twitter- @getinpc

Please Note: This content is provided and hosted by a 3rd party server. Sometimes these servers may include advertisements. igetintopc.com does not host or upload this material and is not responsible for the content.