Tag Archives: PowerShell 3.0

IIS application pool configuration with PowerShell

https://social.msdn.microsoft.com/Forums/en-US/580660b4-3d9e-4605-a28b-3407089caceb/how-to-configure-application-pool-identity-from-powershell?forum=iisconfiguationandscripting

$appPoolPath =  “iis:\AppPools\foo”

$appPool = new-item $appPoolPath

$appPool | set-itemproperty -Name “managedRuntimeVersion” -Value “v2.0”
$appPool | set-itemproperty -Name “managedPipelineMode” -Value “Classic”

function AppPoolConfiguration{
param ([System.String]$applicationPoolName)

$pool = Get-Item “IIS:\AppPools\ASP.NET v4.0”;

#set Enable 32bit Applications
$pool.enable32BitAppOnWin64 = “True”
Log-Info “IIS App pool $pool settings changed: enable32BitAppOnWin64 = True”

#set Pipeline mode
$pool.managedPipelineMode = 0
Log-Info “IIS App pool $pool settings changed: managedPipelineMode = Integrated”

#set Identity
$pool.processModel.username = “reasult\test_lt”
$pool.processModel.password = “2jDsEGih”
$pool.processModel.identityType = 3
Log-Info “IIS App pool $pool settings changed: Identity = $pool.processModel.username”

#set Idle Time-out
$pool.processModel.idleTimeout = “06:00:00”
Log-Info “IIS App pool $pool settings changed: idleTimeout = $pool.processModel.idleTimeout”

#Save
$pool | set-item
}

AppPoolConfiguration $installedWebApplication.applicationPool;

Install msi silently with PowerShell


Warning: Undefined array key 0 in /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 532

Fatal error: Uncaught Error: Call to a member function id() on array in /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php:36 Stack trace: #0 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php(538): CrayonFormatter::format_code() #1 [internal function]: CrayonFormatter::delim_to_internal() #2 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php(516): preg_replace_callback() #3 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_highlighter.class.php(166): CrayonFormatter::format_mixed_code() #4 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_highlighter.class.php(186): CrayonHighlighter->process() #5 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php(703): CrayonHighlighter->output() #6 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/class-wp-hook.php(324): CrayonWP::the_content() #7 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/plugin.php(205): WP_Hook->apply_filters() #8 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/post-template.php(256): apply_filters() #9 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/themes/twentytwelve/content.php(46): the_content() #10 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/template.php(792): require('/home/isgalvota...') #11 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/template.php(725): load_template() #12 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/general-template.php(206): locate_template() #13 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/themes/twentytwelve/tag.php(43): get_template_part() #14 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-includes/template-loader.php(106): include('/home/isgalvota...') #15 /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-blog-header.php(19): require_once('/home/isgalvota...') #16 /home/isgalvotas/domains/sunauskas.com/public_html/blog/index.php(17): require('/home/isgalvota...') #17 {main} thrown in /home/isgalvotas/domains/sunauskas.com/public_html/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 36