Category Archives: PowerShell

Joining a Computer to a Domain

Applies To: Windows Server 2008 R2 This topic explains how to use the Active Directory module for Windows PowerShell to join a computer to a domain. Example 1 The following example demonstrates how to add the local computer to the … Continue reading

Posted in MCSA, PowerShell | Leave a comment

Use Get-ADUser to Find Inactive AD Users

Very nice try this to find a last logon get-aduser -f * -pr lastlogondate|sort -property lastlogondate|ft samaccountname,lastlogondate -auto  

Posted in PowerShell | Leave a comment

How to Add user to a Specific Group Add-ADGroupMember

Add-ADGroupMember Adds one or more members to an Active Directory group. C:\PS>Add-ADGroupMember Sales Manager1, Manager2

Posted in Exam 70-410, PowerShell | Leave a comment

Remove all root hints on a DNS server

This command removes all root hints on the local DNS server. The Get-DnsServerRootHint cmdlet gets all root hints on the local DNS server and passes the results to the Remove-DnsServerRootHint cmdlet. PS C:\> Get-DnsServerRootHint | Remove-DnsServerRootHint    

Posted in Exam 70-410, PowerShell | Leave a comment

Using PowerShell to list installed printers

This tip shows how you can use Windows PowerShell to retrieve a list of printers installed on a print server. You can use the Get-Printer cmdlet to display a list of the installed printers on a print server. For example, … Continue reading

Posted in PowerShell | Leave a comment