Total Pageviews

Search This Blog

Copyright to Cloud TechNet organization . Powered by Blogger.

Pages

Blogger templates

Saturday, 15 April 2017

How to check windows up time for multiple computers by using PowerShell?



   $names = Get-Content C:\Users\h-gonenr.CORP\Desktop\poweshell\serveruptimeandpingstatus\in.txt
        @( 
           foreach ($name in $names) 
          { 
            if ( Test-Connection -ComputerName $name -Count 1 -ErrorAction SilentlyContinue )  
          { 
            $wmi = gwmi Win32_OperatingSystem -computer $name 
            $LBTime = $wmi.ConvertToDateTime($wmi.Lastbootuptime) 
            [TimeSpan]$uptime = New-TimeSpan $LBTime $(get-date) 
            Write-output "$name Uptime is  $($uptime.days) Days $($uptime.hours) Hours $($uptime.minutes) Minutes $($uptime.seconds) Seconds" 
          } 
             else { 
                Write-output "$name is not pinging" 
                  } 
               } 
         ) | Out-file -FilePath C:\Users\h-gonenr.CORP\Desktop\poweshell\serveruptimeandpingstatus\out.txt

Tuesday, 7 March 2017

How to convert Windows error code into Simple English description ?


While troubleshooting, most of the times you can see Windows OS is throwing error in Hexadecimal code. You may find this error in event viewer or msi logs, or CBS logs. Most of the time there wont be any description for this error code in the logs or events. You can convert this error codes into Simple error description. Here I am going to show how to do this. Lets take the below error code as an example.



You can see from the above error message that calling of vbscript.dll was failed with error code 0x80004005. The error code is in Hexadecimal. You have to convert the code into decimal before finding out its error description. Lets convert the code 0x80004005 in to decimal. You donot need to convert whole number into decimal. Take only last four or three last digits from the error code. Here we are going to convert last 3 digit of the error code "005". 


Open the calculator in Programmer mode.  




Enter the value in Hexadecimal


Click on Decimal to get the decimal value

Copy the decimal value. Open a command prompt and run the command net helpmsg <decimalnumber>
in our example command will be net helpmsg 5

You can see the error description for decimal value 5 as "Access is denied". You can further investigate the issue according to the error description. There might be permission issue to access the regitsry location of vbscript.dll in our example, hence the windows throwed the error. Below are some more error codes and its description


0x80070490 - Element not found. 

0x80004005  -  Access is denied. 

0x8007054f  -  An internal error occurred. 

0x80070bc2   -  The requested operation is successful. Changes will not be effective until the system is rebooted. 

0x80070643  -  Fatal error during installation. 


Saturday, 4 March 2017

Wednesday, 1 March 2017

What is Session Lingering in Citrix ?


Session lingering prevents a session from closing as soon as the user ends the last published application in a session. It is assumed that a users may have closed the last published application unknowingly. Instead of logging off, the session is silently retained to provide very short startup times for future published applications.

Session lingering kicks in as soon as a session is meant to be terminated. This may be caused by the user ending the last published application in a session or if both pre-launch timeouts occured (see above).

Session lingering uses two timers to determine whether the lingering session is kept available:

  • Disconnect Timer: After the configured time interval, the session is disconnected. A disconnect timer of zero forces the decision about the session's fate on the terminate timer.
  • Terminate Timer: When this timer runs out, the session is terminated and the users will have to suffer the logon time when launching a published application.

The Citrix eDocs contain a short description of both timers. The above video also provides a walkthrough for setting up session lingering.

 
 
 

What is Session Pre-Launch in Citrix ?


Session pre-launch allows a user (or rather Citrix Receiver) to silently connect to a XenApp farm assuming that the session will be required in the near future. When a user actually starts an application, the startup time is dramatically reduced because a logon is not necessary and session sharing allows published application to be launched inside the active session. As soon as Citrix Receiver starts on the client device, a pre-launch session is created in the background. As soon as a published application is requested by the user, XenApp can immediately start it in the existing session using session sharing.

Session Pre-Launch uses two timers to determine whether the pre-launched session is kept available:

  • Disconnect Timer: Once this timer runs out, the session is disconnected. If the disconnect timer is set to zero, the terminate timer determines the fate of the pre-launched session.

  • Terminate Timer: When a terminate timeout occurs, the pre-launch session is terminated. But this may still result in the session to be retained if session lingering is configured (see below). Without session lingering, the session is ended and the user will have to suffer the logon time when launching a published application.

The Citrix eDocs contain a short description of both timers as well as more information about the hidden pre-launch application. In addition, this video below provides a walkthrough for setting up session pre-launch. Citrix employee David Gaunt has published a very detailed article about session pre-launch and what it looks like in AppCenter.

Tuesday, 28 February 2017

Monday, 27 February 2017

How to Backup and Restore Active Directory on Server 2008



Have you ever accidentally deleted a user account or an OU in Active Directory and wished you could restore it?

I recently had a client call me after they installed updates and rebooted their server. They noticed after the reboot that there was a message that said "Active Directory is rebuilding indices. Please wait".

Their Active Directory database had become corrupted from the updates. So what do you do? How can you restore AD?

Let's talk about how to backup AD in Windows Server 2008 and how to restore it. Today I'll show you:

  • what you need to do to get your Server 2008 ready for backup
  • how to backup Active Directory on Server 2008
  • how to perform an Authoritative Restore of Active Directory
  • how to perform Active Directory Snapshots

Prerequisites: Getting Server 2008 Ready for Backup

Before you can backup Server 2008 you need to install the backup features from the Server Manager.

1. To install the backup features click StartServer Manager.

How to Backup and Restore Active Directory on Server 2008 - 1

2. Next click FeaturesAdd Features

How to Backup and Restore Active Directory on Server 2008 - 2

3. Scroll to the bottom and select both the Windows Server Backup and the Command Line Tools

How to Backup and Restore Active Directory on Server 2008 - 3

4. Click Next, then click Install

Backing up Server 2008 Active Directory

Now that we have the backup features installed we need to backup Active Directory. You could do a complete server backup, but what if you need to do an authoritative restore of Active Directory?

As you'll notice in Server 2008, there isn't an option to backup the System State data through the normal backup utility.

How to Backup and Restore Active Directory on Server 2008 - 4

So what do we do? We need to go "command line" to backup Active Directory.

1. Open up your command prompt by clicking Start and type "cmd" and hit enter.

2. In your command prompt type "wbadmin start systemstatebackup -backuptarget:e:" and press enter.

Note: You can use a different backup target of your choosing

3. Type "y" and press enter to start the backup process.

How to Backup and Restore Active Directory on Server 2008 - 5

When the backup is finished running you should get a message that the backup completed successfully. If it did not complete properly you will need to troubleshoot.

How to Backup and Restore Active Directory on Server 2008 - 6

Now you have a system state backup of your 2008 Server!

Authoritative Restore of Active Directory

So now what if you accidentally delete an OU, group, or a user account and it's already replicated to your other servers? We will need to perform an authoritative restore of the Active Directory object you accidentally deleted.

1. To do this you will need to boot into DSRM (Directory Services Restore Mode) by restarting your server and pressing F8 during the restart.

2.Choose Directory Services Restore Mode from the Advanced Boot menu.

How to Backup and Restore Active Directory on Server 2008 - 7

3. Login to your server with your DSRM password you created during Active Directory installation.

4. Once you're logged into your server and in DSRM safe mode, open a command prompt by clicking Start, type "cmd", and press enter.

5. To make sure you restore the correct backup it's a good idea to use the "wbadmin get versions" command and write down the version you need to use.

How to Backup and Restore Active Directory on Server 2008 - 8

6. Now we need to perform a non-authoritative restore of Active Directory by typing "wbadmin start systemstaterecovery -version:04/14/2009-02:39".

Note: The version of backup will vary depending on your situation. Type "y" and press enter to start the non authoritative restore.

7. Go grab some coffee and take a break while the restore completes.

How to Backup and Restore Active Directory on Server 2008 - 9

8. You can mark the sysvol as authoritative by adding the –authsysvol switch to the end of the wbadmin command.

How to Backup and Restore Active Directory on Server 2008 - 10

9. But if you want to restore a specific Active Directory object then you can use the ever familiar ntdsutil.

For this example we are going to restore a user account with a distinguished name of CN=Test User,CN=Users,DC=home,DC=local. So the commands would be:

ntdsutil

activate instance ntds

authoritative restore

restore object "cn=Test User,cn=Users,dc=home,dc=local"

Note: The quotes are required

How to Backup and Restore Active Directory on Server 2008 - 11

10. Reboot your server into normal mode and you're finished. The object will be marked as authoritative and replicate to the rest of your domain.

Using Active Directory Snapshots

There is a really cool new feature in Windows Server 2008 called Active Directory Snapshots. Volume Shadow Copy Service now allows us to take a snapshot of Active Directory as a type of backup. They are very quick to create and serve as another line of defense for your backup strategy.

With your server booted into normal mode open a command prompt by clicking Start, type "cmd", and press enter.

We are going to use the ntdsutil again for creating the Active Directory snapshots. The commands are:

ntdsutil

snapshot

activate instance ntds

create

quit

quit

How to Backup and Restore Active Directory on Server 2008 - 12

So now that you have a snapshot of AD, how do you access the data? First we need to mount the snapshot using ntdsutil. The commands are:

ntdsutl

snapshot

list all

mount 1 -- (Note: You should mount the correct snapshot you need; for this example there is only 1.)

quit

quit

How to Backup and Restore Active Directory on Server 2008 - 13

Your snapshot is mounted, but how do you access the data? We need to use the dsamain command to accomplish this. Then we need to select an LDAP port to use. The command is as follows:

dsamain –dbpath c:\$SNAP_200905141444_VOLUMEC$\WINDOWS\
TDS\
tds.dit –ldapport 10001

The result should look like this:

How to Backup and Restore Active Directory on Server 2008 - 14

Now we need to go to Start, Administrative Tools, then Active Directory Users and Computers.

Right click Active Directory Users and Computers and select Change Domain Controller.

How to Backup and Restore Active Directory on Server 2008 - 15

In the area that says < Type a Directory Server name [:port] here > enter the name of your server and the LDAP port you used when running the dsamain command.

For my example it would be: WIN-V22UWGW0LU8.HOME.LOCAL:10001

How to Backup and Restore Active Directory on Server 2008 - 16

Now you can browse the snapshot of Active Directory without affecting anything else negatively.

Your AD Backup Strategy

It's always good to have a solid backup plan for your Active Directory. You can use a combination of backup strategies or just one of these methods for backing up your Active Directory.

Make sure you tailor your Active Directory backup strategy to meet your company's needs and make it easy to recover if disaster does strikes.

 
 
 

Friday, 24 February 2017

Download URLs for VMware vSphere Client (2089791)


Download URLs for vSphere Client

Version
File NameDownload URLs
VMware vSphere Client 6.0VMware-viclient-all-6.0.0-2502222.exehttp://vsphereclient.vmware.com/vsphereclient/2/5/0/2/2/2/2/VMware-viclient-all-6.0.0-2502222.exe
VMware vSphere Client 6.0 Update 1VMware-viclient-all-6.0.0-3016447.exehttp://vsphereclient.vmware.com/vsphereclient/3/0/1/6/4/4/7/VMware-viclient-all-6.0.0-3016447.exe
VMware vSphere Client 6.0 Update 2VMware-viclient-all-6.0.0-3562874.exehttp://vsphereclient.vmware.com/vsphereclient/3/5/6/2/8/7/4/VMware-viclient-all-6.0.0-3562874.exe
VMware vSphere Client 6.0 Update 2aVMware-viclient-all-6.0.0-4437566.exehttp://vsphereclient.vmware.com/vsphereclient/4/4/3/7/5/6/6/VMware-viclient-all-6.0.0-4437566.exe
VMware vSphere Client 5.5
VMware-viclient-all-5.5.0-1281650.exe
http://vsphereclient.vmware.com/vsphereclient/1/2/8/1/6/5/0/VMware-viclient-all-5.5.0-1281650.exe
VMware vSphere Client 5.5 Update 1
VMware-viclient-all-5.5.0-1618071.exe
http://vsphereclient.vmware.com/vsphereclient/1/6/1/8/0/7/1/VMware-viclient-all-5.5.0-1618071.exe
VMware vSphere Client 5.5 Update 1a
VMware-viclient-all-5.5.0-1746248.exe
http://vsphereclient.vmware.com/vsphereclient/1/7/4/6/2/4/8/VMware-viclient-all-5.5.0-1746248.exe
VMware vSphere Client 5.5 Update C
VMware-viclient-all-5.5.0-1745234.exe
http://vsphereclient.vmware.com/vsphereclient/1/7/4/5/2/3/4/VMware-viclient-all-5.5.0-1745234.exe
VMware vSphere Client 5.5 Update 1b
VMware-viclient-all-5.5.0-1880841.exe
http://vsphereclient.vmware.com/vsphereclient/1/8/8/0/8/4/1/VMware-viclient-all-5.5.0-1880841.exe
VMware vSphere Client 5.5 Update 2
VMware-viclient-all-5.5.0-1993072.exe
http://vsphereclient.vmware.com/vsphereclient/1/9/9/3/0/7/2/VMware-viclient-all-5.5.0-1993072.exe
VMware vSphere Client 5.5 Update 3
VMware-viclient-all-5.5.0-3024345.exe
http://vsphereclient.vmware.com/vsphereclient/3/0/2/4/3/4/5/VMware-viclient-all-5.5.0-3024345.exe
VMware vSphere Client 5.5 Update 3e
VMware-viclient-all-5.5.0-4032365.exehttp://vsphereclient.vmware.com/vsphereclient/4/0/3/2/3/6/5/VMware-viclient-all-5.5.0-4032365.exe
VMware vSphere Client 5.1
VMware-viclient-all-5.1.0-786111.exe
http://vsphereclient.vmware.com/vsphereclient/7/8/6/1/1/1/VMware-viclient-all-5.1.0-786111.exe
VMware vSphere Client 5.1.0a
VMware-viclient-all-5.1.0-860230.exe
http://vsphereclient.vmware.com/vsphereclient/8/6/0/2/3/0/VMware-viclient-all-5.1.0-860230.exe
VMware vSphere Client 5.1.0b
VMware-viclient-all-5.1.0-941893.exe
http://vsphereclient.vmware.com/vsphereclient/9/4/1/8/9/3/VMware-viclient-all-5.1.0-941893.exe
VMware vSphere Client 5.1 Update 1
VMware-viclient-all-5.1.0-1064113.exe
http://vsphereclient.vmware.com/vsphereclient/1/0/6/4/1/1/3/VMware-viclient-all-5.1.0-1064113.exe
VMware vSphere Client 5.1 Update 1b
VMware-viclient-all-5.1.0-1235233.exe
http://vsphereclient.vmware.com/vsphereclient/1/2/3/5/2/3/3/VMware-viclient-all-5.1.0-1235233.exe
VMware vSphere Client 5.1 Update 1c 
VMware-viclient-all-5.1.0-1364039.exe
http://vsphereclient.vmware.com/vsphereclient/1/3/6/4/0/3/9/VMware-viclient-all-5.1.0-1364039.exe
VMware vSphere Client 5.1 Update 2
VMware-viclient-all-5.1.0-11471691.exe
http://vsphereclient.vmware.com/vsphereclient/1/4/7/1/6/9/1/VMware-viclient-all-5.1.0-1471691.exe
VMware vSphere Client 5.1 Update 2a 
VMware-viclient-all-5.1.0-1880906.exe
http://vsphereclient.vmware.com/vsphereclient/1/8/8/0/9/0/6/VMware-viclient-all-5.1.0-1880906.exe
VMware vSphere Client 5.0
VMware-viclient-all-5.0.0-455964.exe
http://vsphereclient.vmware.com/vsphereclient/4/5/5/9/6/4/VMware-viclient-all-5.0.0-455964.exe
VMware vSphere Client 5.0 Update 1
VMware-viclient-all-5.0.0-623373.exe
http://vsphereclient.vmware.com/vsphereclient/6/2/3/3/7/3/VMware-viclient-all-5.0.0-623373.exe
VMware vSphere Client 5.0 Update 1a
VMware-viclient-all-5.0.0-755629.exehttp://vsphereclient.vmware.com/vsphereclient/7/5/5/6/2/9/VMware-viclient-all-5.0.0-755629.exe
VMware vSphere Client 5.0 Update 1bVMware-viclient-all-5.0.0-804277.exehttp://vsphereclient.vmware.com/vsphereclient/8/0/4/2/7/7/VMware-viclient-all-5.0.0-804277.exe
VMware vSphere Client v5.0 Update 2 
VMware-viclient-all-5.0.0-913577.exe http://vsphereclient.vmware.com/vsphereclient/9/1/3/5/7/7/VMware-viclient-all-5.0.0-913577.exe
VMware vSphere Client v5.0 Update 3 
VMware-viclient-all-5.0.0-1300600.exe http://vsphereclient.vmware.com/vsphereclient/1/3/0/0/6/0/0/VMware-viclient-all-


 
 
 

Wednesday, 11 January 2017