You would have to be running PHP on an windows workstation/server for starters.
You can do it in ASP/VB either by mapping functions to the NT networking DLLS or using the network COM objects so I expect there is a way to do that in PHP. The only major downside is that you would have to give the PHP/Apache service admin permissions which wouldn't be a good idea.
On WIN2K with Active Directory you should be a able to do this sort of thing in ASP/VBScript with the IIS service running as admin:
sub CreateGroup (ServerName, GroupName, GroupDesc)
on error resume next
err.clear
set objServer = GetObject("WinNT://" & ServerName)
set objGroup = objServer.Create("group", GroupName)
objGroup.Description = GroupDesc
objGroup.SetInfo
if err <> 0 then
response.write "Unable to create group" & GroupName
Else
response.write "Finished creating group: " & GroupName
end if
end sub
CreateGroup "vernonh0", "chicago", "Chicagoland office team"
(from msdn)
.. so you may be able to map some of this to PHP ( or not )