hello,
i'm writing script in powershell 2 for site creation . found strange behavious in the following code
# Start-WebCommitDelay
New-WebAppPool $domain
New-Website -Name $domain -HostHeader $domain -IPAddress $ipaddr -PhysicalPath $domainroot -ApplicationPool $domain
New-WebFtpSite -Name $user -HostHeader ($user+".vserver.ru" ) -IPAddress $ipaddr -PhysicalPath $userroot -Port 21
# Stop-WebCommitDelay
if start and stop webcommitdelay commented , then this code works as expected , but if i uncomment them, then web site and ftp site builds incorrect. at least they do not have physical pass assigned .
there is no information in help for start/stop web commit delay but i expected that they act like begin transaction and commit transaction
any ideas why they broke sites creation ( or point me where i may read about this ) .
also. second question . if using WebAdministration snaping for powershell , is there is any commit method .. i am trying to put logfiles to different directories by script ,
like this
PS IIS:\sites> $log = (get-item v127 | Select-Object log* )
PS IIS:\sites> $log.logFile.directory="C:\inetpub\wwwroot\v127\logs"
in powershell i see that changes accepted
PS IIS:\sites> $log.logFile
logExtFileFlags : Date,Time,ClientIP,UserName,ServerIP,Method,UriStem,UriQuery,HttpStatus,Win32Status,BytesSent,By
tesRecv,TimeTaken,ServerPort,UserAgent,Referer,HttpSubStatus
customLogPluginClsid :
logFormat : W3C
directory : C:\inetpub\wwwroot\v127\logs
period : Daily
truncateSize : 20971520
localTimeRollover : False
enabled : True
Attributes : {logExtFileFlags, customLogPluginClsid, logFormat, directory...}
ChildElements : {}
ElementTagName : logFile
Methods :
Schema : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema
but in iis manager log file still points to different place .
so i assume there may be some commit method to update configuration .
tia
ish