Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8580319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:48:13+00:00 2026-06-11T20:48:13+00:00

I have this subroutine that is just displaying blank lines. ‘************************************************************************* ‘ Check MTU

  • 0

I have this subroutine that is just displaying blank lines.

'*************************************************************************
' Check MTU
'*************************************************************************
Sub CheckMTU()
   WScript.Echo("Check if MTU Size is set to 1300")
   WScript.Echo("------------------------------------")
   Set colNetwork = objWMISrvc.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
   For Each objItem in colNetwork
      WScript.Echo(objItem.MTU & vbCrLf)
   Next
End Sub

I want to test to see if the network adapters have a MTU value of 1300. This will be run on multiple machines and the issue I have is the name of network adapters in the registry are always different. It would be nice if my implementation worked…

Any ideas?

EDIT:
I changed the subroutine to this, but it isn’t working.

'*************************************************************************
' Check MTU
'*************************************************************************
Sub CheckMTU()
   Dim intResult
   WScript.Echo("Verify MTU Size is 1300. Changes MTU Size to 1300 ")
   WScript.Echo("------------------------------------")
   Set colNetwork = objWMISrvc.ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE IPEnabled = True") 'WHERE IPEnabled = True
   For Each objItem in colNetwork
      WScript.Echo objItem
      intResult = objItem.SetMTU(1300)
      WScript.Echo intResult
   Next
   If intResult = 0 or intResult = 1 Then
      WScript.Echo("Network Adapter MTU Value is set to 1300. Test PASSED" & vbCrLf)
   Else
      WScript.Echo("Network Adapter MTU Value can't be set to 1300. Test FAILED" & vbCrLf)
   End If
End Sub

It isn’t even printing out the intResult or objItem. It almost feels as if it isn’t getting anything from colNetwork.

Any suggestions? Should I make a new post?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:48:14+00:00Added an answer on June 11, 2026 at 8:48 pm

    Not 100% sure why there’s no MTU value.. BUT you can always set the MTU value calling the SetMTU method: http://msdn.microsoft.com/en-us/library/windows/desktop/aa393463(v=vs.85).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this Perl subroutine that is causing a problem: sub new { my
I have a subroutine that looks like this. It has two parameters. Sub Advance(ByRef
I have a subroutine that changes its operation slightly to include either one list
This is a sub routine that I copied from CPAN. It works fine as
I have a subroutine that takes a filehandle as an argument. How do I
In a base class object, I have an overridable subroutine that I would like
I have the following subroutine: Private Sub MySub(ByVal sender As System.Object, ByVal e As
I have a simple subroutine that loads a list from a database. I would
Have this query: SELECT HOUR( DATE ) AS hr, COUNT( * ) AS cnt
Have this self-made slider: http://jsfiddle.net/wyc3P/4/ What it does: takes min and max values in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.