A Message Can Not Be Sent Using Net Send Command

 

The following knowledgebase describes the problem when using Net Send command to send a message to remote computer or user.

 

The Net Send command can be used to send messages to the following usres:

 

  1. If user is activated.

  2. If user is running Messenger Service on his local computer.

  3. The user must be logged on to a computer and Messenger Service on local computer must be running in order to receive the message.
 If above conditions are not true the Net Send command will not work. The Net Send command requires the Messenger Service to be enabled on remote computer.  

You can use the following options with Net Send command:

 

NET SEND {name | * | /DOMAIN[:name] | /USERS} message

 

name               Is the username, computername, or messaging name to send the message to. If the name is a computername that contains blank characters, enclose the alias in quotation marks (” “).

 

*                Sends the message to all the names in your group.

 

/DOMAIN[:name]         Sends the message to all the names in the workstation domain. If


                        name is specified, the message is sent to all the names in the specified


                       domain or workgroup.

 

/USERS           Sends the message to all users connected to the server.

 

message           Is text to be sent as a message.

  

 

SRV Records Of Domain Controller In DNS Zone

The following knowledgeable help you to determine the problem if SRV records of a domain controller is not registered in the DNS Zone of that domain.

The following may happen when SRV records of a domain controller are not registered in DNS Zone of that domain:

  • All the client computers make take long time to log on to the domain.
  • Client computers stuck at Applying Computer Settings.
  • Group Policy settings may not apply.
  • Folder Redirection policy is not working
  • Software Installation is not working.
  • Replication between domain controllers is not happening.
  • An application is giving error about SRV records. An application may use DNS to locate domain controllers by sending SRV queries.
  • Nslookup returns error when querying using SRV records.
  • Pinging of SRV records (_ldap, _keberos etc) are not successful.
  • Group Policy Objects are not syncing.

The SRV records may be the cause the above. The SRV Records of a domain controller in the domain plays an important role in Active Directory. Active Directory can not work without a DNS server. The DNS server in Active Directory is used to locate Domain Controllers in the forest or domain with the help of SRV records. Service Records or SRV records are registered specifically for domain controllers when you promote a member server to domain controller. The Netlogon service on domain controller is responsible to register SRV records.

You can use the following methods to re-register SRV records of a domain controller in the domain DNS zone:

  1.  
    1. Restart the Netlogon service on domain controller.
    2. Run DcDiag /fix
    3. Run NetDiag /ifx
    4. Re-register from Netlogon.dns file in \Windows or Winnt\System32\Config directory.

The Netlogon.dns file is created when you promote a member server to domain controller.

Net Config Server command.

The following knowledgebase will help you analyze the information useful when typed Net Config Server command. The Net Config Server command is the subset or command line tool to configure the Computer Property page in System applet. This command is very useful to check couple of things.

You can configure the following settings using the Net Config Server command:

  1. Configure the computer description to be shown when browsing through network.
  2. Make server hidden when browsing network.
  3. Configure maximum connection time for the client computers to this server.

clip_image002

The above is an example of Net Config Server command. The above output from this command shows the Server Name, Server Comment etc. You can change the Server comment by using the following command:

Net Config Server /SRVCOMMENT: “Internet Information Server”

In the same way, you can use the following command to change the server’s visibility in network:

Net Config Server /HIDDEN: Yes / No

The “Maximum Logged On Users” displays the number of connections this server can accept over the network. It displays maximum 10 that means only 10 users can log on to this server or access files over the network. You can not change this.

The “Idle session time (min)” is the time up to which users can be active on this server. After expiry of this time, the users will be disconnected automatically and they have to log on to again to access files. By default, it is 10 minutes but you can change it to as per your requirement. To change the idle time setting, please use the following command:

Net Config Server /AUTODISCONNECT: 50

Login Scripts, Computer and User Logon Scripts! – Difference

You may have noticed the following policy settings in Group Policy and for a while confused about these policy settings for user.

There are three places in Group Policy where you can configure programs to run when a computer starts and after a user logon to the system. These three places are under the following container:

  • User Configuration\Windows Settings\Scripts (Logon\Logoff)
  • User Configuration\Administrative Templates\System\Logon
  • Computer Configuration\Administrative Templates\System\Logon

In the last two, you will see the following policy settings:

  1. Run these programs at user logon
  2. Do not process the run once list
  3. Do not process the legacy run list

The above policy settings appear in both: User and Computer Configuration container.

For “Run these programs at user logon” policy setting, if this policy setting is configured in both the container (user and computer) the user policy setting will run just after computer policy setting.

For last two “Do not process the run once list” and “Do not process the legacy run list” policy settings, if this policy setting is configured in both the container (user and computer) the computer policy setting will take precedence over user policy setting.

Why so? The reason is very simple. The Run Once list is configured in Local Machine HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce only. The programs in this registry key are processed only after user has logged on to the system. There is no RunOnce key for user. That is why computer RunOnce will run after user RunOnce.

Now, you may ask that there is logon programs, login scripts and logon scripts but there is no Logoff Programs? It is because a program requires system resources when it runs whereas a logoff shuts down all the applications. While a windows is shutting down a program can not stay in memory.

There is a difference between running a program and a script. Please note the difference. A program is something which is installed on users computer and you configure in “Run these programs at user logon” by specifying the full path of that program. This program runs Locally. On other hand, a script is something which is run over the network. You need to specify a complete path of the program you wish to run when a user’s login script has finished.

So the point is very clear and the script or programs are run in the following order:

  1. Computer Startup / Script runs.               Will be applicable to all the computers
  2. User Login script runs. Will be applicable to all the users.
  3. Computer logon programs run Will be applicable to all the computers.
  4. User logon programs run Will be applicable to all the users.

After user login script has finished, the Winlogon at workstation will retrieve a list of programs to run on local computer from GPO.

In above, there is no conflict in policy settings so all the program will run one by one.

Group Policy Key terms:

Not Configured

This means Policy setting is not configured and Winlogon service at client end,

While processing the Group Policy Objects from domain controller, will not process this policy

setting.

Disabled

This means Policy setting is configured but Domain Controller will not publish it for

processing or Winlogon at workstation will not process this setting.

Enabled

This means Policy setting is configured and will be processed by Winlogon service at

workstation.

The Microsoft has designed two options for Group Policy for NOT processing Group Policy settings. The “Disabled” option in Policy settings are configured per policy setting whereas “Disable User or Computer Policy settings” in property of GPO is used to NOT to process any policy settings configured in the said container. The later option overrides settings configured in earlier option.

  1. Computer policy settings only run when computer starts just before user logon. Example, you have a network drive to map for all computers. This network drive mapping will be available for all the users who log on to that system.
  1. User policy settings only run after user log on to the system. In above example, the network drive mapping will be available to all users who logs on to the system.
  1. Third option is filtering Group Policy settings using groups. This option doesn’t necessarily defeat the above rule but is here to process the GPO for selected users or computers. In above example, if you create a Group called “ServiceComputers” and put 4 computers in that group and apply a policy setting to this group then only the computers will receive this policy.

Other options are “Block Policy Inheritance” and “No Override”. The first option can be set on a child policy meaning you can not set this option at site level or there is no use of this option at parent policies. This option, if enabled, forces child GPO not to accept any policy settings coming from Parent GPO. The “No Override” option, if enabled, forces child GPO not to block any policy setting coming from parent GPO. If there is a conflict in the policy, the Parent GPO settings will be applied provided “No Override” option is enabled.

How To View The Available Servers On A NetWare Network Using Command Line

This knowledgebase will tell you how you can view a network servers list on NetWare network.

The following command can be used to display a lit of servers running on a NetWare Network:

Net View /Network:NW

Please use the following command if you want to see the list of resources on a server running in the NetWare Network:

Net view \\computer_name /Network:NW

If you omit the /Network:NW, the command will display the resources shared on specified computer.

How To See the Print Jobs On A Remote Computer Using Command Line

The following knowledgebase can be used to see the print jobs running on remote or local computer and their size.

Net Print

You can also use do the following using the Net Print command:

  1. Control a Print Job.
  2. Hold a print job for printing.
  3. Delete a print job
  4. Reactive a print job that is held.

The following options can be used with Net Print command:

NET PRINT \\computername\sharename [\\computername] job# [/HOLD | /RELEASE | /DELETE]

\\computername Is the name of the computer sharing the printer queue(s).

sharename Is the name of the shared printer queue.

job# Is the identification number assigned to a print job. A computer the one or more printer queues assigns each print job a unique number.

/HOLD Prevents a job in a queue from printing. The job stays in the printer queue, and other jobs bypass it until it is released.

/RELEASE Reactivates a job that is held.

/DELETE Removes a job from a queue.

How to find the Actual Logon Domain Name of a Client Computer

The following knowledgebase will show you how to find a client’s actual domain name on which client has logged on successfully.

By typing Net Config Workstation you can see the domain name. The output will be:

clip_image002

The “Logon domain” in above output shows the domain name on which client has logged on successfully. This domain controller of this domain has logged on client successfully. This also shows that there is trust relationship between child and parent domains.

You can also search the following registry key to check which DNS Domain name was used by the Group Policy:

HKLM\Software\Microsoft\Windows\CurrentVersion\Group Policy\History.

You can see the DCName in the right pane which contains the DNS Domain name of client machine.

Windows Update – Continued…

You can try to register the following DLLs if Windows Update service is not starting up or having some issue updating/running Windows Updates:

 1. Create a batch file and copy the following DLL into the batch file and then double to register the following modules.

regsvr32 c:\windows\system32\vbscript.dll
regsvr32 c:\windows\system32\mshtml.dll
regsvr32 c:\windows\system32\msjava.dll
regsvr32 c:\windows\system32\jscript.dll
regsvr32 c:\windows\system32\msxml.dll
regsvr32 c:\windows\system32\actxprxy.dll
regsvr32 c:\windows\system32\shdocvw.dll

2. Restart the Windows Update and Automatic service

3. Stop the Cryptographic Service

4. Remove the folder \Windows\System32\Catroot2

5. Rename the \Windows\SoftwareDistribution folder.

 

This above folder is the restoring point for Windows Update service.

 

6. Now restart the Cryptographic Service.

7. Create another batch file and put the following lines in it and then double click on it to register the modules:

regsvr32 /s Softpub.dll
regsvr32 /s Mssip32.dll
regsvr32 /s Initpki.dll
regsvr32 softpub.dll
regsvr32 wintrust.dll
regsvr32 initpki.dll
regsvr32 dssenh.dll
regsvr32 rsaenh.dll
regsvr32 gpkcsp.dll
regsvr32 sccbase.dll
regsvr32 slbcsp.dll
regsvr32 cryptdlg.dll
regsvr32 Urlmon.dll
regsvr32 Shdocvw.dll
regsvr32 Msjava.dll
regsvr32 Actxprxy.dll
regsvr32 Oleaut32.dll
regsvr32 Mshtml.dll
regsvr32 msxml.dll
regsvr32 msxml2.dll
regsvr32 msxml3.dll
regsvr32 Browseui.dll
regsvr32 shell32.dll
regsvr32 wuapi.dll
regsvr32 wuaueng.dll
regsvr32 wuaueng1.dll
regsvr32 wucltui.dll
regsvr32 wups.dll
regsvr32 wuweb.dll
regsvr32 jscript.dll
regsvr32 atl.dll
regsvr32 Mssip32.dll

 

 

Your Windows Update should work.

Checking Operating System Version and Copying Customized MSGINA.dll file.

This script explains how you can use a small script in GPO Login Script to copy a customized MSGINA.dll for logon purpose to operating systems. Windows XP and Windows 2000 MSGINA.dll are different. Windows 2000 MSGINA.dll will not work on Windows XP and vice-versa.
 
  1. This script stores the reports in a central place (\\domain_name.com\netlogon\logon\MSGINAReport.csv. and report is saved as CSV so you can open it in Excel.
  2. MSGINA.dll file is copied as per the Operating System version. If its XP then MSGINA.dll for XP will be copied to client computer. If its Windows 2000 then MSGINA.dll for Windows 2000 will be copied to client computer.
  3. Ver.exe and hostname.exe are used to determine the Operating System version and Computer Name respectively.
 

***Start***

@Echo off
REM Reports will be saved in \\domain.com\netlogon\logon\MSGINAReport.csv

Echo Computer Name, Windows Version, Copied or Not ? >> \\domain.com\netlogon\logon\MSGINAReport.csv

SET Comp_name=
SET Win_Ver=
SET GinaCopied=

Hostname > host.txt
FOR /F “Tokens=1” %%a in (host.txt) DO Set Comp_name=%%a

VER > ver.txt
FOR /F “Tokens=*” %%a in (ver.txt) DO SET Win_Ver=%%a

Find /i “XP” < Ver.txt
if %ERRORLEVEL% == 0 (
     COPY “\\domain.com\netlogon\logon\msgina-xp.dll” “%WINDIR%\System32”
     IF %errorlevel% == 0 (
            SET GinaCopied=Yes
      ) ELSE (
            SET GinaCopied=No
      )
     CALL REGEDIT /S \\domain.com\netlogon\logon\logon-xp.REG
) ELSE (
     COPY “\\domain.com\netlogon\logon\msgina-2k.dll” “%WINDIR%\System32”
     IF %errorlevel% == 0 (
            SET GinaCopied=Yes
      ) ELSE (
            SET GinaCopied=No
      )
     CALL REGEDIT /S \\domain.com\netlogon\logon\logon-2k.REG
)

Echo %Comp_name%, %Win_Ver%, %GinaCopied% >> \\domain.com\netlogon\logon\MSGINAReport.csv

***End***

How do you check if Windows is updating or not?

Users at technical board ask me many questions related to Windows Updates. They are much worried about networked computers/servers and keep asking questions related to that at boards.

I have been asked many times by users about Windows Updates. A question is still roaming in there mind about Windows Updates – this is whether my server is getting updates or not ! This is really a big challenge in computing environment to keep your computer upto date. If you delay for one day, a virus or hacker may infiltrate and disturb your whole network.

There are many ways to check it. Here are couple of them:

1. Using Registry – you can navigate to the following location in registry and check for Article or Hot Fix no. applied to the computer. If its there that means Hot Fix or updates have been applied successfully.HKLM\Software\Microsoft\updates\Windowsxxxx\ —>>> check out the list of updates being applied.

2. Using Psinfo.exe from Sysinternals. You can download it from Microsoft site or Internet. You can run this exe on a specified computer and it will give you a list of hot fix or updated installed on that computer. 

3. Using Add/Remove Programs in Control Panel, you can see the list of updates installed as software programs.

4. You can also check the Windows Update log file. This file gives you information about all the Hot Fix and updates being applied on the server.