NAME

Win32::IIS::Admin - Administer Internet Information Service on Windows

SYNOPSIS

use Win32::IIS::Admin;
my $oWIA = new Win32::IIS::Admin;
$oWIA->create_virtual_dir(-dir_name => 'cgi-bin',
                          -path => 'C:\wwwroot\cgi-bin',
                          -executable => 1);

DESCRIPTION

Enables you to do a few administration tasks on a IIS webserver. Currently only works for IIS 5 (i.e. Windows 2000 Server). Currently there are very few tasks it can do. On non-Windows systems, the module can be loaded, but new() always returns undef.

METHODS

new

Returns a new Win32::IIS::Admin object, or undef if there is any problem (such as, IIS is not installed on the local machine!).

iis_version

Returns the version of IIS found on this machine, in a decimal number format like "6.0".

get_timeout

Returns the IIS timeout value.

set_timeout

Given an integer, sets the IIS timeout to that value. Does no checking on the value passed in, so use carefully!

path_of_virtual_dir

Given the name of a virtual directory (or 'ROOT'), returns the absolute full path of where the physical files are located. Returns undef if there is no virtual directory matching the name given.

create_virtual_dir

Given the following named arguments, create a virtual directory on the default #1 server on the local machine's IIS instance.

-dir_name => 'virtual'

This is the virtual directory name as it will appear to your browsers.

-path => 'C:/local/path'

This is the full path the the actual location of the data files.

-executable => 1

Give this argument if your virtual directory holds executable programs. Default is 0 (NOT executable).

add_extension_restriction

Given the following named arguments, adds an "extension restriction" to the default #1 server on the local machine's IIS instance. Only works on IIS version 6.0. Note: no checking is done on the arguments, so it is possible to add bogus/duplicate/conflicting/illegal values to your IIS configuration. For more information, see http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/79652e88-e713-4aa5-a88c-8e2bd6a2955e.mspx?mfr=true

-allow => <0, 1>

Send 0 if this is a "deny" rule; send 1 if this is an "allow" rule. The default is 0, deny.

-path => <fullpath>

The full path to the executable or extension. This argument is required.

-groupid => <string>

"A non-localizable string used to identify groups of extensions." Default is empty string.

-description => <string>

"A localizable description of the extension." Default is empty string.

remove_extension_restriction

Given the full path of an existing "extension restriction" in the default #1 server on the local machine's IIS instance, removes that restriction. If more than one restriction refers to the same path, they will all be removed. Only works on IIS version 6.0.

remove_extension_restriction_group

Given the group ID of an existing "extension restriction" in the default #1 server on the local machine's IIS instance, removes all restrictions of that group. Only works on IIS version 6.0.

restart_iis

Restarts the IIS service on the local machine. Assumes that IISReset.exe is in your path.

errors

Method not implemented. In the current version, error messages are printed to STDERR as they occur.

BUGS

To report a bug, please use http://rt.cpan.org.

AUTHOR

Martin Thurn mthurn@cpan.org

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.