Techit Tricks

You can download videos of CCNA | Azure | Vmware | AWS | Citrix | HP

Updating Users Email Addresses In Active Directory Using Power Shell

I'm referring to the Email address value that is listed on the user object in Active Directory,It not affect any Exchange server Settings.

Follow the below Steps:

Step 1:

Open Windows Power Shell in Administrator mode.

Run the below Command in Power Shell.
Import-Module ActiveDirectory
Get-ADUser -Filter * -SearchBase 'DC=test,DC=net' | `
    ForEach-Object { Set-ADUser -EmailAddress ($_.samaccountname + '@test.net') -Identity $_ }

Note : Execute both commands separately.

Step 2:

Now you may, (like on my test network above,) have your user logon name set to something other than firstname.lastname if so and you would prefer to set the Email value to firstname.lastname@domain.com then use the following instead.

Import-Module ActiveDirectory
Get-ADUser -Filter * -SearchBase 'DC=test,DC=net' | `
    ForEach-Object { Set-ADUser -EmailAddress ($_.givenName + '.' + $_.surname + '@test.net') -Identity $_ }

Note : Execute both commands separately.


Step 3:

Close and then Restart.

Email Address Updated Successfully.

 


Every Administrator Should Know the Tips and Tricks

Every Administrator Should Know the Tips and Tricks

Every Administrator Should Know the Tips and Tricks:

Active Directory

1. Quickly list all the groups in your domain, with members, run this command:

    dsquery group -limit 0 | dsget group -members –expand 

2. Find all users whose accounts are set to have a non-expiring password, run this command:

    dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0

3. List all the FSMO role holders in your forest, run this command:

    netdom query fsmo

4.Refresh group policy settings, run this command:

   gpupdate

5. Check Active Directory replication on a domain controller, run this command:

   repadmin /replsummary

6. Force replication from a domain controller without having to go through to Active
    Directory Sites and Services, run this command:

    repadmin /syncall

7. See what server authenticated you (or if you logged on with cached credentials) you can run either of these commands:
set l

     echo %logonserver%

8.See what account you are logged on as, run this command:

     whoami

9. To see what security groups you belong to, run this command:

     whoami /groups

10. To see the domain account policy (password requirements, lockout thresholds, etc) run this command:

     net accounts

Windows Networking

11. Quickly reset your NIC back to DHCP with no manual settings, run this command:

     netsh int ip reset all

12. Quickly generate a text summary of your system, run this command:

     systeminfo | more

13. See all network connections your client has open, run this command:
   
     net use

14. To see your routing table, run either of these commands:
   
     route print
     netstat -r

15. Need to run a trace, but don’t have Netmon or Wireshark, and aren’t allowed to install either one? Run this command:

     netsh trace start capture=yes tracefile=c:\capture.etl
     netsh trace stop

16. To quickly open a port on the firewall, run this command, changing the name, protocol, and port to suit. This example opens syslog:

     netsh firewall set portopening udp 161 syslog enable all

17. To add an entry to your routing table that will be permanent, run the route add command with the –p option. Omitting that, the entry will be lost at next reboot:

    route add 0.0.0.0 mask 0.0.0.0 172.16.250.5 –p

18. Here’s a simple way to see all open network connections, refreshing every second:

    netstat –ano 1

19. You can add a | findstr value to watch for only a specific connection, like a client ip.addr or port:

    netstat –ano | findstr 216.134.217.20

20. You can use the shutdown to shutdown or reboot a machine, including your own, in a simple scheduled task like this:

    shutdown –r –t 0 –m \\localhost

21. To make planned DNS changes go faster, reduce the TTL on the DNS records you plan on changing to 30 seconds the day before changes are to be made. You can set the TTL back to normal after you confirm the changes have been successful.

22. Set a short lease on DHCP scopes that service laptops, and set Microsoft Option 002 to release a DHCP leas on shutdown. This helps to ensure your scope is not exhausted and that machines can easily get on another network when the move to a new site.

Windows 7

23. Want to enable the local administrator account on Windows 7? Run this command from an administrative command prompt. It will prompt you to set a password:

    net user administrator * /active:yes

24. You can do the same thing during install by pressing SHIFT-F10 at the screen where you set your initial user password.

Windows 7 supports several useful new keyboard shortcuts:


25. Windows Key+G

Display gadgets in front of other windows.

26. Windows Key++ (plus key)

Zoom in, where appropriate.

27. Windows Key+- (minus key)

Zoom out, where appropriate.

28. Windows Key+Up Arrow

Maximize the current window.

29. Windows Key+Down Arrow

Minimize the current window.

30. Windows Key+Left Arrow

Snap to the left hand side of the screen

31. Windows Key+Right Arrow

Snap to the right hand side of the screen.

32. To quickly launch an application as an administrator (without the right-click, run as administrator), type
the name in the Search programs and files field, and then press Ctrl-Shift-Enter.
Here are some tips that can save you from buying commercial software:

33. Need to make a quick screencast to show someone how to do something? The Problem Steps Recorder can create an MHTML file that shows what you have done by creating a screen capture each time you take an action. Click the Start button and type ‘psr’ to open the Problem Steps Recorder.

34. Need to burn a disc? The isoburn.exe can burn ISO and IMG files. You can right click a file and select burn, or launch it from the command line.

35. Windows 7 includes a screen scraping tool called the Snipping Tool. I have tons of users request a license for SnagIt, only to find this free tool (it’s under Accessories) does what they need.

36. You can download this bootable security scanner from Microsoft that will run off a USB key, which is very useful if you suspect a machine has a virus.

37. A great way to save all your command line tools and make them available across all your computers is to install Dropbox, create a folder to save all your scripts and tools, and add that folder to your path. That way, they can be called from the command line or any other scripts, and if you update a script, it will carry across to any other machine you have.

Windows 2008

38. You can free up disk space on your servers by disabling hibernate. Windows 2008 will create a hiberfil.sys equal to the amount of RAM. This is very useful with VMs that have lots of RAM but smaller C: drives. To disable hibernation, and reclaim that space, run this command:

powercfg -h off

39. You can get to the complete collection of Sysinternals tools online. You can even invoke them from the run command. Use the url: http://live.sysinternals.com or the UNC path: \\live.sysinternals.com\tools.

40. Speaking of the Sysinternals tools, almost any command line in this article can be run remotely on another machine (as long as you have administrative rights) using the psexec command included in the Sysinternals tools.

41. You can kill RDP sessions at the command line when you find that all the RDP sessions to a server are tied up.

regsvr32 query.dll [enter] You only have to do this the first time.
query session /server:servername [enter]
reset session # /server:servername [enter]

42. You can create a list of files and display the last time they were accessed, which is very useful when a network drive is low on space and users swear they have to have that copy of Office 2003 on the network. My advice? If they haven’t touched it in two years, burn it to DVD or write it to tape and then delete it from disk:

dir /t:a /s /od >> list.txt [enter]

43. The Microsoft Exchange Err command is one of the best all around troubleshooting tools you will find, as it can decode any hex error code you find as long as the products are installed on the machine. Download it from here.

44. You can see all the open files on a system by running this command:

openfiles /query

45. You can pull all the readable data out of a corrupt file using this command:

recover filename.ext

46. Need to pause a batch file for a period of time but don’t have the sleep command from the old resource kit handy? Here’s how to build a ten second delay into a script:

ping -n 10 127.0.0.1 > NUL 2>&1

47. If your Windows website has stopped responding, or is throwing a 500 error, and you are not sure what to do, you can reset IIS without having to reboot the whole server. Run this command:

iisreset

48. You can use && to string multiple commands together; they will run sequentially.

49. If you find yourself restarting services frequently, you can use that && trick to create a batch file called restart.cmd and use it to restart services:

net stop %1 && net start %1

50. You can download a Windows port of the wget tool from here, and use it to mirror websites using this command:

wget -mk http://www.example.com/

Linux

51. You can list files sorted by size using this command:

ls –lSr

52. You can view the amount of free disk space in usable format using this command:

df –h

53. To see how much space /some/dir is consuming:

du -sh /some/dir

54. List all running processes containing the string stuff:

ps aux | grep stuff

55. If you have ever run a command but forgot to sudo, you can use this to rerun the command:

sudo !!

56. If you put a space before a command or response, it will be omitted from the shell history.

57. If you really liked a long command that you just ran, and want to save it as a script, use this trick:

echo “!!” > script.sh

Active Directory Administration with Windows PowerShell via Remote Access

Active Directory Administration with Windows PowerShell via Remote Access

Remote Active Directory Administration with Windows PowerShell: 

Windows Server 2008 R2 automatically installs the Active Directory Module for Windows PowerShell and Active Directory Administrative Center when you add the Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS) role.
If you want to manage Active Directory from another computer at a remote location, and you can do so with the Active Directory and ADAC, as long as you are running Windows Server 2008 R2 or Windows7 on the remote computer. 

Install Remote Server Administration Tools with the Add Features Wizard:

The Active Directory Module for Windows PowerShell and the ADAC are part of the Remote Server Administration Tools feature, which you can add as a whole or by selecting individual modules. Both modules require you to install the .NET Framework 3.5.1 feature as well, and to install ADAC, you must also install the Active Directory Module for Windows PowerShell and AD DS Snap-Ins and Command-Line Tools features.  

Install Remote Server Administration Tools with Windows PowerShell :

1.First open a Windows PowerShell session with elevated privileges. You can do this by right-clicking the shortcut and selecting Run As Administrator.
   Use the following command to import the ServerManager module.
                    Import-Module ServerManager 

2.Once you have done this, you can install individual features by name using the Add- Windowsfeature cmdlet. To display a list of the Command IDs for all of the roles and features available for installation, use this command.
                         Get-WindowsFeature

3.You can then use the following command to install the Active Directory Module for Windows PowerShell and ADAC features:  
                  Add-WindowsFeature RSAT-AD-PowerShell,RSAT-AD-AdminCenter


Follow the steps to install Remote Server Administration Tools with Servercmd.exe

You can use the same Command IDs to install the features from a standard (non-Windows PowerShell) command prompt, although this method has been deprecated in favor of Windows PowerShell. For this method, you once again must open the command prompt session with elevated privileges. Then execute the following two commands individually:  

                          Servercmd.exe -install RSAT-AD-PowerShell

                        
Servercmd.exe -install RSAT-AD-AdminCenter

Follow the steps to install Remote Server Administration Tools on Windows 7

You can manage your Active Directory resources from a Windows 7 workstation also, but first you must download and install the Remote Server Administration Tools for Windows 7. After you install the package, you must open the Programs Control Panel, select Turn Windows Features On Or Off, and select the appropriate check boxes under Remote Server Administration Tools.  

How to Set Pattern Lock on Windows Operating Systems

Set Pattern Lock on Windows Operating Systems: 

Now a days Security is the most important thing that most of the people looks for. If you are an android mobile user, then you might be aware of built in Android Lock pattern security. In windows Environment,  you have only password based lock security. But its easy to identify while matching with our records. so you another chance to protect your device add Android-like pattern lock on windows OS.

Lock your device with the help of  Eusing Maze Lock. Using Maze Lock is a free and easy to use tool which enables you to add an android like pattern lock to windows os. With this, you can add an Automatic lock on windows at startup or after a specified time.You can set an alert message if the password entered was wrong for specified no.of times. 

Add Pattern Lock security on your windows OS, just follow these simple steps.

1.First Download Eusing Maze lock and install it on your Windows computer.

2.After that you can see Maze lock icon in your system tray at right bottom corner.

3.Right click on Maze lock icon and select Configure.

4.Now Maze Lock configure window appears. There you’ll see Default lock pattern. Just click on Reset Pattern to reset the current pattern and for adding a new one.

5.Now you have to set a new pattern by dragging with your mouse on the grid. By clicking on Backup Pattern, you can save your pattern as a BMP image. But make sure that you save your pattern at a safe place.
6.After setting up a new pattern, click on General Tab. Here you have you set Maze lock settings like turning on Autolock at windows startup/after specified time, adding alert text…
7.If you want, you can add a Background image for your lock screen. For that click on Background tab and click on Change Image button, upload image and click on ok button.

8.You’ve added lock pattern security on your windows OS. Now press windows key + A to open your lock screen and use your newly created pattern to unlock your system.








Restore deleted objects in Active Directory Using (Ldp.exe)

How to recover individual deleted objects in Active Directory with a help of Ldp.exe utility. In this recovery can be used when Active Directory Recycle Bin function is disable for some reason or AD scheme is lower than Windows 2008 R2.

1.Run Ldp.exe utility.

2.Select the Connect item in the Connection menu

3.Select Bind (Ctrl+b) in the Connection menu.
4.Enter the name and password of a domain administrator and domain name.It is neccessary to point out domain BaseDN in View - Tree (Ctrl+t) menu.
5.After that open CN=Deleted Objects,DC=domain,DC=com node. Find a deleted object by name. Select it:
 
6.Delete <<isDeleted>> attribute.
7.Then change DN (distinguishedName) (CN=new object name, OU = path) at the same window.


8.Press Run.

                                          Successfully Active Directory Objects Recovered.


Installing and Configuring DNS

The Active Directory Installation wizard offers to install DNS if the wizard does not detect a proper DNS zone configuration during the installation of Active Directory. However, you should not rely on the wizard for these tasks. Many bug reports have been submitted regarding installation bases that relied on the wizard.


You should know how to configure DNS for Active Directory. Here is the procedure.

  1. Click Start --> Settings --> Control Panel. 

  2. Double-click Add/Remove Programs and then click Add/Remove Windows Components. 

  3. In Components, select Networking Services and then click Details.

  4. In Subcomponents of Networking Services, select the Domain Name System (DNS) check box, click OK, and then click Next. 
 
  5. In Copy Files From, type the full path to the Windows distribution files and then click OK. 

To host Active Directory, you must properly configure DNS with a zone for the Active Directory namespace. You should create both zone types for a proper DNS implementation for your Active Directory namespace — that is, a forward lookup zone and a reverse lookup zone. Read on to discover how.

Creating a forward lookup zone:

  1. Click Start --> Programs --> Administrative Tools --> DNS.

  2. Expand the DNS server.

  3. Right-click the Forward Lookup Zone folder and choose New Zone.

  4. Click Next to continue when the New Zone wizard appears. 

  5. Ensure that Standard Primary is selected and click Next. 

  6. Ensure that Forward Lookup Zone is selected and click Next.

  7. At the New Zone page, type the name of your zone (for example, fordummies.com) and click Next. 
 
  8. Select Create a New File With This File Name and click Next. 

  9. Click Finish. 

 Creating a reverse lookup zone:

  1. Click Start --> Programs --> Administrative Tools --> DNS.

  2. Expand the DNS server. 

  3. Right-click your server and choose New Zone. 

  4. Click Next to continue when the New Zone wizard appears. 

  5. Ensure that Standard Primary is selected and click Next. 

  6. Ensure that Reverse Lookup Zone is selected and click Next. 

  7. Ensure that Network ID is selected, type your network ID in the Network ID field, and click Next.

  8. Select Create a New File With This File Name and click Next. 

  9. Click Finish. 

Your " DNS" server is almost ready. You should now configure the forward and reverse lookup zones for dynamic updating so that you do not get stuck creating all the records required for Active Directory  

Microsoft Toolkit 2.6.6 Windows and Office Activator - Free Download

Microsoft Toolkit 2.6.6 is the toolkit for any windows computer that is free and it is a set of tools that helps you manage, license, deploy, and activate all Microsoft Office programs, as well as Microsoft Windows in general. It does support all editions of Microsoft Windows (windows 10, windows 8.1 windows 8, windows 7) as well. If you run Microsoft Office (2003, 2007, 2010, 2013 and 2016) on your computer, you should look into this software. Microsoft Toolkit will help you make your Microsoft Office packages run better if they are copied or pirated versions of the original



Download Click Here







How to Migrate Exchange Server

How To Migrate conference room mailbox from 2003 to 2007


1. We are not using Auto Accept agent with Exchange 2003, so we need to manually login to the mailbox and remove Auto acceptance on calendar in NAPTG. To do this:

a. Tools ->Options -> Calendar options Resource scheduling

b. “Uncheck”  Automatically accept meeting requests and process cancellation



2. Now migrate the mailbox to Americas using Quest

3. Open Exchange management shell with “Run as Administrator”

4. Run the cmdlet to convert the mailbox to ROOM mailbox

(Note : Here we used "Tow700_Heritage_Conf_rm" and "Tow700_Marketing_Conf_rm"  as a Exchange server name replace this with your Server name)

Set-Mailbox "##TOW700_MARKETING_CONF_ROOM" -Type Room

5. Run the cmdlet to have the mailbox accept meetings automatically:

Set-MailboxCalendarSettings "##TOW700_HERITAGE_CONF_RM" -AutomateProcessing AutoAccept

6. To maintain subject in meetings:

Set-MailboxCalendarSettings "##TOW700_HERITAGE_CONF_RM" – DeleteSubject $False

7. To Process External meeting requests:

Set-MailboxCalendarSettings "##TOW700_HERITAGE_CONF_RM" – ProcessExternalMeetingMessages $True

8. To test the settings:

Get- MailboxCalendarSettings "##TOW700_MARKETING_CONF_ROOM" |fl

Get-Mailbox "##TOW700_MARKETING_CONF_ROOM" |ft Name, RecipientTypeDetails

Should be RoomMailbox

Get-MailboxCalendarSettings "##TOW700_HERITAGE_CONF_RM" |ft AutomateProcessing, DeleteSubject, ProcessExternalMeetingMessages

Should be AutoAccept, False, True

9. Login to the mailbox server on which the converted mailbox resides and Restart the “Microsoft Exchange Mailbox Assistants” service for these settings to take effect.

10. Grand permissions to self in EMC

11. Now, Configure Outlook for the Conference room mailbox.

12. Close Outlook and open with the Outlook switch  Outlook /resetfolders

13. This will fix the issue “You do not have permission to view this calendar”

How do I reset a computer’s domain account

How do I reset a computer’s domain account?

Normally, computers’ domain accounts are self-maintaining. Computers authenticate to the
domain automatically upon startup, and periodically change their domain passwords without
your intervention. However, it is possible for a computer’s domain account to have problems,
which can require you to reset the account.
Resetting a computer’s domain account will break the link between the computer and the domain.
The computer will have to be joined to a workgroup (thus removing it from the domain), then re-joined
to the domain.



Resetting the Account

You can reset a computer account by using either the Microsoft Management Console (MMC)
Active Directory Users and Computers snap-in or a command-line utility. To use Active
Directory Users and Computers, open Active Directory Users and Computers, and locate the
computer’s account. By default, Active Directory places computer accounts in the Computers
container. However, your organization might place computer accounts in another organizational
unit (OU). Right-click the computer account, and select Reset from the context menu.

(You can’t perform this procedure with a domain controller. Generally, there’s no need, as the
computer can always contact itself to reset its own password. However, if a domain controller’s Active)

Directory account becomes unsynchronized, you’ll have to use DCPromo to remove and reinstall
Active Directory.
To use a command-line utility, run

dsmod computer computername –reset

replacing computername with the name of the computer you want to reset.

You must be a Domain Administrator, Enterprise Administrator, or have the appropriate delegated
permissions to perform these tasks.



Rejoining the Domain :

Once its account is reset, a computer will be unable to authenticate to the domain. Essentially,
you’ve changed the computer’s password and have no way to tell it what the new password is.
The only solution is for you to remove the computer from the domain, then rejoin it to the
domain.

A side effect of the computer being unable to authenticate to the domain is that no users will be able
to log on to the computer by using domain credentials.
To rejoin the domain on a Windows XP Professional computer (the process for Windows 2000—
Win2K—is similar), right-click My Computer, and select Properties from the Context menu. On
the Computer Name tab, click Change. Select Workgroup, and click OK to close all dialog
boxes. You will need to restart the computer. Return to the Computer Name tab after restarting,
and click Change again. Select Domain, provide the appropriate domain name, and click OK.
You will need to provide the appropriate user credentials to add the computer back into the
domain. After completing these steps, the computer should be able to authenticate to the domain.
Restart the computer and ensure that the domain logon problem is resolved. 

How to disable usb in windows

Disable USB Drives and Mass Storage Devices using Registry

If the administrator is smart then he would definitely do this to ensure a tight blockade. He would alter the settings through regeditcommand on run console. Now how do you unlock it ? You have to go right into where the administrator has been. Here is how.
  1. Go to Start > Run , type “regedit” and press enter to open the registry editor
  2. Navigate to the following key
  3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR

In the right pane, select Start and the default value is 3 u can change the value to 4. (The value 4 will disable USB Storage). Click OK. This will re-enable USB Ports and allow you to use USB or Pen drives.

Simple method to install windows 7

DVD and CDs are getting expired, as of now OS Installations are maximum followed by USB Drive only.
Things Needed to Start Installation:
  • Windows 7 or Windows 8 ISO file and Winrar or a burned DVD with the install source files
  • 4 GB USB flash drive for Windows 7.  You may need a 8 GB USB flash drive for some Windows 8 ISO files. 
Let's start the process :
Don't worry About CMDs, Microsoft now has a free utility that will automatically make a bootable USB flash drive from a Windows 7/8 ISO image file. Simply download the tool, and specify the location of your ISO file That is ;)



Expecting your valuable comments below.