Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Win32::NetAdmin

Posted on 1999-07-29
3
Medium Priority
?
271 Views
Last Modified: 2012-08-13
Just wanted to play around with this module but apparently I'm completely retarded.  It looked simple enough, but I can't for the life of me get it to do ANYTHING...for instance:
use Win32::NetAdmin;
$server="PDCServer";
$filter="*";
@Users = "";
Win32::NetAdmin::GetUsers($server,$filter,@users);

All I get back is the usage file.  I thought maybe the @users it was going to return might just be a handle so I changed it to $users and that simple told me that it wasn't a hash or an array.  I didn't think it was anything that difficult to call this and I can't find any examples of this stuffy anywhere.  I know it has to be something completely simple that I just can't see.  Help.  Please.  Frustrated.

0
Comment
Question by:timberbt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Author Comment

by:timberbt
ID: 1214523
BTW, I've tried $server as blank, $filter as blank and *ALL* combinations thereof.

0
 
LVL 5

Accepted Solution

by:
prakashk021799 earned 120 total points
ID: 1214524
You need to pass the reference to the array, not the array itself. Change it to:

Win32::NetAdmin::GetUsers($server,$filter,\@users);

Notice the \ before the @users.

0
 
LVL 1

Author Comment

by:timberbt
ID: 1214525
Doh!  I totally forgot about that.  Thanks!

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question