Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Friday, 1 January 2016

Happy New Year with Random Colors

$colors =
@("DarkCyan","Green","Cyan","Red","Magenta","Yellow")

    $message =
    "Learn From Yesterday,
    Live For Today,
    Hope For Tomorrow.
    Happy New Year"

    for($i=0;$i -lt $message.length; $i++)
    {

    Write-Host -ForegroundColor (Get-Random -inputObject $colors) -NoNewLine $message[$i]
   
    }

    Write-Host
   

Wednesday, 22 April 2015

How to check if a remote server is reachable

You can store the servers in $Servers variable

_________________________________________________________________

$Servers = "Server1","Server2","Server3"

Foreach ($Server in $Servers)
{

  $StatusPC = Test-Connection -Cn $Server -BufferSize 16 -Count 1 -ea 0 -quiet

      if ($StatusPC -eq $True)
       {    
       Write-host
       Write-host "$Server is reachable" -foregroundcolor Green -backgroundcolor black
       }

       else
       {
        Write-host
        Write-host "$Server is not reachable" -foregroundcolor Red -backgroundcolor black
       }

}

       Write-host


_________________________________________________________________

Note: If the servers are reachable you will be able to see the output in Green if not then you will see Red 


Alternate One-Liner Script:
get-content servers.txt | % {new-object psobject -property 
@{ComputerName=$_; Reachable=(test-connection -computername $_ -quiet -count 1)} }  
| ft -AutoSize

Tuesday, 21 January 2014

DC Promo error: The local administrator account becomes the domain administrator

The local administrator account becomes the domain administrator error when running dcpromo
When trying to promote a Windows Server 2008 R2 X64 server to a domain controller of a new forest i obtained the following error which stopped the promotion of the system:

To resolve this error, open a command prompt as administrator and execute the following command: net user Administrator /passwordreq:yes *

Thursday, 4 July 2013

How to seamlessly extend the windows server trial to 240 days

The Microsoft evaluation releases of their products are incredibly valuable and useful tools as they allow you to have an unlimited number of test, demo and development environments to work with at no cost. The only catch is evaluation releases are time limited, so the more time you can squeeze out of them, the more useful they can be.

Here we are going to show you how to extend the usage time of the Windows Server 2008 R2 evaluation release to its maximum.

How it Works
Once activated the Windows Server 2008 R2 evaluation (or trial) lasts for 180 days, after which you must either enter a valid license key or the server will shut itself down after one hour of use.

With most every Microsoft product which requires activation, there is a grace period of several days in which the product can be used (unrestricted) before activation is required. In the case of Windows Server 2008 R2 evaluation, this grace period is 10 days which can be reset (or re-armed) 5 times before activation is required. When fully utilized, gives an extra 60 days of usage time.

To put your mind at ease, this practice is completely legal and actually promoted by Microsoft. We are simply approaching this with an automated “set it and forget” it process.

Refer the Blog for complete details

Thursday, 27 June 2013

Windows 8.1


The Start button is back and Microsoft has even included 3D printing support. Well, is it good enough? We find out...

Microsoft rolls out the next version of windows, 8.1, at its annual Build developers conference today. It's a big deal. Windows 8 was a crazy ambitious step, what follows is just as important. This is what Microsoft's taken from your months of feedback (or just, yelling).

Almost everything coming in 8.1 seems like a genuine improvement.

Check the blog for more info

Wednesday, 5 June 2013

Windows Server 2012 R2

According to the Microsoft Corporate vice president Brad Anderson, "Windows Server 2012 R2 will be available for preview in June and will be officially released before the end of the year [2013].

Windows Server 2012 R2 Storage Improvements:


  • Automated Storage tiering: Storage in windows server 2012 can be configured to allocate workloads to the most appropriate storage types. For example, you can configure SSD drives to be prioritized for applications and workloads were speed and latency are vitally important, and to rely on slower types of storage for less important workloads.
  • "Generation 2" virtual machines: Windows Server 2012 R2 Hyper-V introduces what Microsoft is calling "Generation 2" virtual machines. Gen 2 VMs only support the 64-bit versions of Windows 8 and Windows Server 2012 R2 as guest OSes. Gen 2 VMs remove all of the legacy, BIOS-based functionality of traditional VMs. These VMs are UEFI-based, have no emulated devices, can boot off virtual iSCSI and network adapters, and support secure boot. The benefits to using Gen 2 VMs could be numerous, including the potential of vastly reduced VM sizes by eliminating support for legacy, BIOS-based overhead. Traditional "generation 1" virtual machines will still be enabled by default.
  • Hyper-V Recovery Manager: According to Woolsey, Hyper-V Replica has proven to be one of the most popular features of Windows Server 2012, so Windows Server 2012 R2 introduces the Hyper-V Recovery Manager, a new centralized management console that allows you to manage site replication.

Friday, 18 January 2013

Unable to save the host file


Default location for hosts file is "C:\Windows\System32\drivers\etc"

While working on the installation of Blackberry Enterprise Server on Windows Server 2008 R2, i have encountered an issue where i am unable to modify the hosts file on the server.

While troubleshooting found that there is a local administrator account on the system and with the same name another account exists on the domain.

After deleting the local administrator account which is the duplicate of the account which exists on the domain, the issue is solved.

Finally i am able to modify and save the content on hosts file.

Monday, 14 January 2013

How to determine if my Windows 7 is 32-bit or 64-bit


You can use one of the method mentioned below to determine whether your Windows 7 is 32-bit or 64-bit

Method 1

1. Right Click on "Computer"
2. Properties
3. A windows opens where it mentions 32 or 64 bit
4. If nothing is mentioned, most of the time it's a 32-bit version

Method 2

1. Click the Start button
2. Control Panel
3. System
4. Maintenance
5. System
6. Under system tab you can find the type of the system: 32 or 64 bit


Method 3

1. Go to C:\
2. The presence of this folder shows that it is a 64 bit system
3. C:\Program Files(x86)



Method 4

1. Open Command Prompt
2. Type the below command
wmic os get osarchitecture
3. It will return the output as below 
OSArchitecture
64-bit

Method 5

1. Open Command Prompt
2. Type the below command for a quick output
echo %Processor_Architecture%
3. It will return the output as below for 64-bit
AMD64

Method 6

1. Open Command Prompt
2. Type the below command
SystemInfo | "System Type"
3. It will return the output as below for 64-bit
System Type: x64-based PC


Thursday, 10 January 2013

How to get the list of user accounts created from a certain date till the latest from a DC

 OS: Windows Server 2008 R2

      Login to Domain Controller which is Windows Server 2008 R2
    Open Powershell and import the module active directory
      Set the date variable as the start point from which you want to search till the latest



It will query for the users which are created after 1st Jan 2013

Note: Date Time Format (Year, Month, Date)