Title: RE: Exchange Mailbox Size
Since you mention Exchange Administrator, I'm assuming these are Exchange 5.5 servers.
It is possible to walk through every message and every folder in an Exchange server to total the message sizes using Win32::OLE and CDO, but it takes an awful long time.
W
Title: product version
Why don't you post a working sample of your code, so that we can see whether your problem is replicable.
Gary
-Original Message-
From: Sibi John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 3:22 PM
To: Perl (E-mail)
Subject: (no subject)
Title: RE: alternative to cmd.exe
I presume what you mean is that the functions such as system, exec, and backticks invoke CMD.EXE instead of 4NT.EXE.
The documentation for the system function (see perldoc -f system) implies that the shell invoked by system is hardcoded.
Here's a little s
Title: RE: File I/O Question
Without knowing the exact composition of your input file, it's difficult to infer what you're trying to accomplish.
But, there's at least one obvious problem. Try replacing
while () {
$sBody .= ;
}
(which appears to be appendi
Title: RE: Question
Win32::Message
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 2:18 AM
To: [EMAIL PROTECTED]
Subject: Question
Hi all,
could you give me a hint to simulate the net send command
thanks
__
order outside of the while loop.
Gary
-Original Message-From: Nikko Odiseos
[mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001
12:25 PMTo: Gary MacDonald;
[EMAIL PROTECTED]Subject: RE: Parsing pids
from drwtsn.log
Thanks Gary, but that is only half the battle.
Title: Message
I've removed the unnecessary foreach loop and
the $line variable. I'm assuming that 2152 OUTLOOK.exe is at the beginning of a
line.
The trick is to use the capturing capability of the
regex.
$pid =
'0'; # invalid PID
while ()
{
if
((
The
documentation for Net::Ping doesn't suggest that an IP address string (e.g.,
'192.168.1.1') has to be converted to a thirty-two bit integer. Just use
the IP address string (or a scalar containing the
string):
print "Host
is alive" if $p->ping('192.168.1.1');
Net::Ping d
Title: RE: Win32::AdminMisc::GetEnvVar
The hash containing the environmental variables is $List.
Try something like this:
Win32::AdminMisc::GetEnvVar(\%List, ENV_USER) || die "Cannot retrieve information.\n ";
print "$key --> $List{$key}\n" foreach $key (sort keys %List);
This function
rse a REG_MULTI_SZ when you don't
know how many component variables are stored within the value?
Thanks,
Jim
Jim>>> Gary MacDonald <[EMAIL PROTECTED]>
11/25/01 09:39PM >>>
With SplitMultis set to 0, for a REG_MULTI_SZ value GetValue returns a
st
use
Term::ReadKey;## Get
password#print "\nPassword :
";ReadMode('noecho');my $password = ReadLine(0);print
"\n\n";chomp $password;
"Monroe, John M" wrote:
Hello all thanks for the help in advance.
I am writing a perl script to reinstall sms for bunch of domain admins
Title: RE: Need help with SplitMultis (REG_MULTI_SZ) using Win32::TieRegistry
With SplitMultis set to 0, for a REG_MULTI_SZ value GetValue returns a string with the values separated by null, and ending with a double null:
Value1\x00Value2\x00\x00
which you could access by splitting
Title: RE: selecting text from file
Mea
culpa ... the open and close functions in my examples should not, of course, be
written in upper case.
-Original Message-From: Gary MacDonald
[mailto:[EMAIL PROTECTED]]Sent: Sunday, November 25, 2001
11:49 AMTo:
[EMAIL PROTECTED
Title: RE: selecting text from file
Someone else has noted the problem of square brackets within your regular expressions.
However, the basic algorithm is flawed as well. Having identified the first token in the input stream, another record must be read before you check for the second token
ntended to be inserted into a predefined message resource that has
been added to an .EXE or .DLL file.
Gary
-Original Message-From: Gary MacDonald
[mailto:[EMAIL PROTECTED]]Sent: Thursday, November 22, 2001
5:08 AMTo:
[EMAIL PROTECTED]Subject: RE: "The
descripti
Title: RE: "The description for event ID..." messages when using Win32::EventLog messages
See Microsoft Knowledge Base article Q184719 for a description of the problem and a workaround.
Gary
-Original Message-
From: Philip Morley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November
See
the sample scripts in Thomas Eck's Windows NT/2000 ADSI Scripting for System
Administration. They're written in VB/VBScript, but can be converted to
Perl using Win32::OLE.
-Original Message-From:
Webb, Andy [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 21,
2001 3:23 PM
Title: RE: Win32::OLE
There is a wealth of COM objects that are made accessible through the Win32::OLE module. Included are ADSI, WMI, CDO, ADODB, to name a few.
Click on the URL at the bottom of this message, and search the archives of this discussion group for the string "Win32::OLE".
Yo
Title: RE: WMI Help
According to the WMI SDK, the Status property of Win32_Process is a string. The WMI Object Browser that comes with the SDK confirms that Status is a string, and also indicates that its value is for all instances of Win32_Process on my computer. Win32::OLE returns undef f
Title: RE: module or method for ARP (Address Resolution Protocol)
Actually, I wasn't happy with either of my earlier
answers, since the original question really only requested a Perl-equivalent of
the "arp -a" command. And all that "arp -a" does is display the arp cache
table.
So,
attache
Title: RE: module or method for ARP (Address Resolution Protocol)
For a generic solution, you can use NetPacket::ARP which is available on CPAN.
For a Windows-specific solution you can use the sample script below which is provided as part of the WMI SDK. I've modified the script slightly by
Title: RE: Process Help
Assuming the machine is local, you could run tlist.exe within backticks, and then parse through the output. For a remote machine, you could use the Resource Kit's 'rkill.exe /view' utility.
Or you could use WMI. Attached is a script written by Dave Roth which has a G
Title: Capture message to stderr in a Perl variable
See
perldoc -q
stderr
Gary
-Original Message-From: Chavez Gutierrez, Freddy
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, October 30, 2001
10:49 AMTo: Perl (E-mail)Subject: Capture message to
st
Title: RE: Checking "closed" directories ?
Have a look at the NTSEC Security Tools (www.pedestalsoftware.com).
I believe it will meet all your requirements.
Gary
-Original Message-
From: Herold Heiko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 11, 2001 2:28 AM
To: List Per
Title: RE: Subtracting two arrays
The expression @subset{@subset} is a hash slice.
If @subset contained ('one', 'two') then
@subset{@subset} = ();
is the equivalent of
@subset{'one', 'two'} = (undef, undef);
or
$subset{'one'} = undef;
$subset{'two'} = undef;
Another w
Title: RE: Querying Service Pack
Use Microsoft's HFNetChk utility.
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/tools/hfnetchk.asp
Gary
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, September 28, 2001 6:03 AM
Title: RE: REGEX Premath $`
It's tough to figure out what you're trying to accomplish, since the "i" modifier on the regex doesn't make any sense, but if you want the "g" modifier to cause repeated passes on the string, then you need to place the regex in its own loop.
Something like this:
Title: WMI and Perl (WAS: Remote process)
Go to msdn.microsoft.com and search for WMI. You'll find the WMI SDK and the WMI Tutorial.
Also see Marcin Policht's WMI Essentials for Automating Windows Management.
Your second challenge will be how to convert the VBScript examples from the abov
Title: RE: Accessing Exchange Hierarchy
What version of Exchange? Please elaborate on what you mean by Exchange Hierarchy.
Gary
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: Accessing E
Title: RE: Redirecting Command Output to a file
Search the archives of the Perl-Win32-Admin list for MAPI or SMTP.
Gary
-Original Message-
From: Veeraraju_Mareddi [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 24, 2001 3:52 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Redi
Title: RE: Help moving sub-directories in Perl...
It is not clear from your code, but I'm assuming that 8am, 12pm, and 5pm are directories, which is what your subject line implies.
You need to check the return value and print the $! variable if the call to the move function returns false.
T
You should
check the return value from the UserSetMiscAttributes, and if false you should
print the error message using:
print Win32::FormatMessage (
Win32::GetLastError() );
Gary
-Original Message-From: Dan Navilliat
[mailto:[EMAIL PROTECTED]]Sent: Friday, August 10, 20
Title: RE: How can I get Perl to work like a bat file.
In addition to the replies you've already received ... you can use CMD's command separator '&&':
$PgmReturn = system('cd /D C:\\install && setp.exe');
Using unquoted strings is a bad habit that will eventually cause you grief. Backsla
Title: RE: Setting columns per page
Simply insert four spaces at the left side of your format picture line. For example,
use strict;
my $foo = 'Hello, World!';
write;
#
format STDOUT =
@<
$foo
.
Gary
-Original Message-
From: Kyle Payne [mailto:[EMAIL
If
you have installed ActivePerl, then the missing section you cite below can be
found in the Availability & Install subsection of the ActivePerl FAQ section
of the HTML documentation installed on your local drive.
However, I don't think you'll find the answer to your
question there.
The
Title: RE: (no subject)
For NT 4.0 system administration using Perl, you should buy, borrow, or steal a copy of the following seminal texts:
Roth, Dave. Win32 Perl Programming: The Standard Extensions.
Roth, Dave. Win32 Perl Scripting: The Administrator's Handbook.
replace
\x2F with
/
Gary
-Original Message-From: Gary
MacDonald [mailto:[EMAIL PROTECTED]]Sent: Friday, April 20,
2001 4:43 PMTo: 'Bateman, John [Austin-IS)'; Active State
(E-mail)Subject: RE: Has anyone already invented the
wheel
This should get you started ...
Title: Has anyone already invented the wheel
This
should get you started ...
use
strict;use File::Find;use Time::Local;use Win32::Lanman;#my
$time = timelocal(59,59,23,31,11,98); # Dec 31, 1998, 23:59:59my @servers =
qw(server1 server2 server3);my @resources;#foreach my $server
(@serv
Title: character/numeric in a string and bitwise operations.
From
perlop:
If you are intending to manipulate
bitstrings, you should be certain that you're supplying
bitstrings: If an operand is a number, that will imply a
numeric bitwise operation. You may explicitly show whic
Title:
From the Quirks section of the
ActivePerl FAQ:
STDIN and STDOUT, and
Piping don't always work on NT.
You may get unexpected results when you try to redirect the output of files
that use Windows NT's file association feature. You can use pl2exe or pl2bat to
convert a Perl script to a
Title: RE: Automating unzipping of files
If you don't insist on a pure Perl solution, then a system call to pkunzip does just fine. Here's a fragment of one of our scripts:
print "Beginning download ...\n";
$ftp->binary() or die "FTP binary failed\n";
$ftp->get($datfi
Title: RE: Accessing a PST file
How to determine
if CDO is installed on a given machine? Search the registry for the key
"MAPI.Session", which indirectly links to the CDO.DLL
library.
With Outlook
98, CDO is installed if you're running the Corporate or Workgroup
version.
With Office 2
es much of the Reference section
in its appendices, but for all the gritty details you need to return to the
Platform SDK.
Gary
-Original Message-From: Thomas, Timothy B
[mailto:[EMAIL PROTECTED]]Sent: Friday, March 09, 2001 1:52
PMTo: 'Gary MacDonald';
'[EMAIL
Title: RE: Accessing a PST file
Working with CDO
in Perl is challenging because there's not much sample Perl code
around to assist in porting the sample VB, VBA, and VBScript code that's
available.
Below is a small
working Perl script that purges the Deleted Items folder in a Personal Fold
Title: RE: Accessing a PST file
See the Microsoft Knowledgebase article Q171638. The example is written in Visual Basic, but it can be ported to Perl using the Win32::OLE module.
Professional CDO Programming, published by Wrox Press, is also an excellent resource. Again, the examples
Title: RE: e-mail attachments
Use MIME::Lite instead of Mail::Mailer.
Here's some sample code:
use strict;
use MIME::Lite;
#
MIME::Lite->send('smtp', 'mail.peanutgallery.net');
#
# send a text attachment with no message
#
my $msg = MIME::Lite->new(
From =>'[EMAIL PROTECTED]',
T
Title: RE: convert comp3 data question
Have a look at Convert::IBM390.
See http://search.cpan.org/doc/GROMMEL/Convert-IBM390-0.12/IBM390.pm
Gary W. MacDonald
-Original Message-
From: John.F.Kennedy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 8:58 AM
To: [EMAIL P
Title: RE: Mailbox adsi and otherMailbox
The Perl examples I've seen all used a reference to an anonymous array, so I'd try passing an array reference in the call.
$mailBox->PutEx(2,'otherMailbox',\@Others)
Gary W. MacDonald
-Original Message-
From: Durant, Ryan A [mailto:
Title: RE: An unidentified error message!
OK ... so under Win32, $^E and Win32::GetLastError() often report the same information.
Under what operating system are you running this code? What version of Perl?
Please run this small script (after making appropriate substitutions for DOMAIN, f
Title: RE: An unidentified error message!
Use
print Win32::FormatMessage(Win32::GetLastError());
instead of
print "$^E";
Gary W. MacDonald
-Original Message-
From: Gupta, Priyanka [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 02, 2001 1:00 PM
To: '[EMAIL
Title: RE: NT & Exchange
Try using "PESSIMISM" as the string for your server.
Assuming the server is a PDC or a BDC, the fact that Exchange is also installed on the machine won't interfere with your ability to add or remove users from the SAM database.
Gary W. MacDonald
-Original
Title: RE: Run in background
You could try either of these commands:
nohup perl-script &
or
at now + 1 minute
perl-script
^D
(Apparently "at teatime" is legal too, but not useful in this instance :-)
Gary W. MacDonald
-Original Message-
From: PerlWin32 [mailto:[
Title: RE: Remote admin with multiple passwords?
You should be able to administer remotely by connecting to the IPC$ share on each workstation.
use strict;
use Win32::NetResource;
my %hash = (RemoteName => 'workstation\\IPC$');
my $password = 'x';
my $username = 'x';
Win32::NetRe
Title: RE: :Ping ko
The documentation for Net::Ping says:
pingecho() or a ping object with the tcp protocol use alarm() to implement the timeout. So, don't use alarm() in your program while you are using pingecho() or a ping object with the tcp protocol. The udp and icmp protocols do not use
Title: RE: AdminMisc::LogonAsUser
Use this to view the error from Win32::AdminMisc ...
use Win32;
print Win32::FormatMessage(Win32::GetLastError());
Gary W. MacDonald
-Original Message-
From: Sheldon Fuchs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 28, 2000 9:11 A
Title: RE: Benchmarking or timing Perl scripts?
See the Devel::DProf module. There's a helpful discussion of the module in the 3rd edition of Programming Perl.
Gary W. MacDonald
-Original Message-
From: P J [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 25, 2000 1:21 PM
To: [
56 matches
Mail list logo