Home » Posts tagged 'windows server'

Tag Archives: windows server

Send-MailMessage : Unable to connect to remote server Line

Send-MailMessage -to “reciever@domin.com” -from “sender@domain.com” -Subject “Subject Info” -Body “Content” -SmtpServer “Server Name”

Was not able to send mail from a Windows 2008 server and the error message displayed is as listed below:

Send-MailMessage : Unable to connect to the remote server
At line:1 char:17
+ Send-MailMessage <<<< -to someone@somedomain.com -from “DhimantR@someDomain.com” -subject ” Troubleshooting” -Body “Some Text or file attachement” -sntpserver “smtpserver”
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.Send MailMessage

Found that the the block was in McAfee, when Powershell was excluded from McAfee. Send mail was success.

Steps to exclude Powershell in McAfee is listed below:

  1. Right click on McAfee icon.
  2. Click on Virus Scan Console.
  3. Double click on Access Protection on VirusScan Console.
  4. On Access Protection tab.
  5. Go to Anti-Virus Standard Protection.
  6. On right hand side, double click on Prevent mass mailing worms from sending mail.
  7. On process to exclude tab, add PowerShell.exe at the end.
  8. Click OK.
  9. Click apply on Access Protection.
  10. Click OK.

Thanks,
WintelAdmin

PowerShell for Administrators – Coming Soon

PowerShell essentials for administrators coming soon on WintelAdmin to help with your daily operations.

Stay Tuned…..

WintelAdmin.com

IBM DB2 error SQL5005C during server startup.

Upon windows server hosting DB2 reboot you will get an error message “SQL5005C”. This actually refers to “The operation failed because the database manager failed to access either the database manager configuration file or the database configuration file.” This is due to DB2 database utility (such as db2start, db2icrt, restore, or many others) requires that the database manager write to or read from either the database manager configuration file or the database configuration file, and the database manager was unable to access the configuration file.

This is fixed by performing the below steps:

1. Log in to the machine as system administrator.
2. Remove the db2systray by performing the following steps:
a. Windows Start –> All Programs –> IBM DB2 –> Command Line Tools –> Command Window Administrator.
b. db2systray -clean
3. Log off and log in to the machine.

Thanks,
WintelAdmin

VMware Tools is no more depended on vSphere/Esxi release.

VMware tools 10.0.0 is now no more dependent on vSphere release/Esxi builds. I think this is the first time when VMware released VMware Tools separately. As per release note its backward compatible, compatible with Esxi 5.0 and also compatible with Workstation 12.0 and VMware Fusion 8.0. It will allow to get the latest new features and enhancements made to the VMware tools faster to the customers.

You can download and install the latest version of VMware Tools from Here.

Thanks,
WintelAdmin

VB Script to collect Windows server hardware details on multiple machines.

VB Script to collect Windows server hardware details. Script will Collect Serial Number, Make, Model, OS, CPU, RAM, Drive details on multiple servers remotely.

Copy below contents and save as filename.vbs and create a machines.txt will all server names one per line.

 

***********************************************************************************************************************

Option Explicit

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

Const PATH_TO_INPUT = “Machines.txt”
Const PATH_TO_OUTPUT = “MachineInventory.csv”

Dim fso
Set fso = WScript.CreateObject(“Scripting.FileSystemObject”)

Dim shl
Set shl = WScript.CreateObject(“WScript.Shell”)

Dim input
Set input = fso.OpenTextFile(PATH_TO_INPUT)

Dim output
Set output = fso.CreateTextFile(PATH_TO_OUTPUT, True)

output.WriteLine “Hostname,Serial Number,Make,Model,BIOS Version,Operating System,CPU,Memory (MB),Disk Drives”

Dim wmiService
Dim wmiResults

Dim hostname
Dim make
Dim model
Dim biosversion
Dim operatingSystem
Dim serialNumber
Dim cpu
Dim memory
Dim drives

Dim line
Dim exec
Dim pingResults
While Not input.AtEndOfStream
line = input.ReadLine
hostname = “”
make = “”
model = “”
biosversion = “”
operatingSystem = “”
serialNumber = “”
cpu = “”
memory = “”
drives = “”

Set exec = shl.Exec(“ping -n 2 -w 1000 ” & line)
pingResults = LCase(exec.StdOut.ReadAll)

If InStr(pingResults, “reply from”) Then
WScript.Echo “Reply From: ” & line
On Error Resume Next

Set wmiService = GetObject(“winmgmts:\\” & line & “\root\CIMV2”)

If Not Err.Number = 0 Then
output.WriteLine line & “,Error: ” & Err.Description
WScript.Echo line & “,Error: ” & Err.Description
On Error GoTo 0
Else
On Error GoTo 0
hostname = line

Set wmiResults = wmiService.ExecQuery(“SELECT * FROM Win32_BIOS”, “WQL”, wbemFlagReturnImmediately + wbemFlagForwardOnly)

Dim item
For Each item In wmiResults
serialNumber = Trim(item.SerialNumber)
biosversion = Trim(item.SMBIOSBIOSVersion)
Next

Set wmiResults = wmiService.ExecQuery(“SELECT * FROM Win32_ComputerSystem”, “WQL”, wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each item In wmiResults
make = Trim(item.Manufacturer)
model = Trim(item.Model)
Next

Set wmiResults = wmiService.ExecQuery(“SELECT * FROM Win32_OperatingSystem”, “WQL”, wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each item In wmiResults
operatingSystem = Trim(item.Name)
operatingSystem = Split(operatingSystem, “|”)(0)
memory = Round(Trim(item.TotalVisibleMemorySize) / 1024, 2)
Next

Set wmiResults = wmiService.ExecQuery(“SELECT * FROM Win32_Processor”, “WQL”, wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each item In wmiResults
cpu = Trim(item.Name)
Next

Set wmiResults = wmiService.ExecQuery(“SELECT * FROM Win32_LogicalDisk WHERE DriveType=3”, “WQL”, wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each item In wmiResults
drives = drives & Trim(item.DeviceID) & ” ” & Round(Trim(item.Size) / (1024^2), 2) & “;”
Next

output.WriteLine hostname & “,” & serialNumber & “,” & make & “,” & model & “,” & biosversion & “,” & operatingSystem & “,” & cpu & “,” & memory & “,” & drives
WScript.Echo hostname & “,” & serialNumber & “,” & make & “,” & model & “,” & biosversion & “,” & operatingSystem & “,” & cpu & “,” & memory & “,” & drives
End If
Else
output.WriteLine line & “,No Response”
WScript.Echo line & “,No Response”
End If
Wend

output.Close
input.Close

Set wmiService = Nothing
Set wmiresults = Nothing

***********************************************************************************************************************

 

Thanks,

WintelAdmin

 

Microsoft Student Associates (MSA) – India Program

Microsoft recently announced registrations for the Microsoft Student Associates (MSA) – India Program. If you are a student, have a passion for Microsoft technologies, love social media and are involved at your campus, then this opportunity is sure to interest you. This new initiative from Microsoft, focuses on developing leadership qualities of students in their campus.As a Microsoft Student Associate or MSA, you will represent your local campus as technology enthusiasts and social media/marketing evangelists.

Click to REGISTER

Thanks,
WintelAdmin

How to restore Backup ROM version on HP servers using ROM Based Setup Utility.

Recently, we upgraded firmware on all our blade enclosures and servers. This time we got stuck with the Citrix servers. We were informed that the Citrix applications are not working after the recent updates. After lot of struggle it was traced out that the issue was due to the ROM version incompatibility and we had to restore the previous ROM version.

This was achieved using the “Redundant ROM Settings” available under RBSU (ROM Based Setup Utility). Please follow the below steps to restore your previous ROM without searching for the setup files.

1. Access ROM Based Setup Utility by pressing the F9 key during power on.
2. Select “Advanced Options”.
3. Select “Advanced System ROM Options”.
4. Choose “ROM Selection”.
5 Select “Switch to Backup ROM”.
6. Press the Enter key.
7. Press the Esc key to exit the current menu or press the F10 key to exit RBSU. The server restarts automatically.

Thanks,

WintelAdmin

 

Rejoin a computer to domain without restart

We have been in the situation where we find that the Windows Server has its security relationship with the domain failed. In the past we had to remove the computer from the domain and then join it back again to reestablish the relationship.

This involved two reboots (one to leave, one to join). If it was a server that took a while to boot, the process could take so long.

However, I recently came across an article today which mention a PowerShell command to rejoin a computer to the domain without restarting it

Test-ComputerSecureChannel is one of those cool little PowerShell cmdlets that doesn’t get the recognition it deserves. Running the cmdlet by itself checks whether the relationship with the domain controller is still good. If it comes back True then everything is okay. If it comes back False then the relationship needs to be fixed.

Using Test-ComputerSecureChannel with the –credential –Repair options allows you to repair the relationship with the domain without any restarts. You run the command, sign out and then can sign in with your domain credentials. For example, to repair the relationship with the WINDOWSITPRO domain, issue the command:

Test-ComputerSecureChannel –credential domain\Administrator –Repair

When signed on as a local administrator.

Test-ComputerSecureChannel has been around since Windows Server 2008 R2.


Visitors Count

Subscriber Count

    3891
April 2017
M T W T F S S
« Feb    
 12
3456789
10111213141516
17181920212223
24252627282930