1
vote
1answer
28 views

What do the error messages and codes mean when creating and installing Managed Service Accounts?

When using the PowerShell Cmdlets for creating and installing Managed Service Accounts, certain errors can be thrown. What does each error mean?
0
votes
0answers
36 views

Modify IIS web.config using PowerShell

I'm trying to modify the web.config using PowerShell. So far, I'm able to replace the Connection String using: Set-WebConfigurationProperty -pspath "IIS:\Sites\$Name\WS" -filter ...
0
votes
0answers
30 views

Server migration with a lot of IIS websites - done with PowerShell

We are migrating our last physical machines to virtual machines. Some servers have a lot of IIS websites running. In the past the IIS migration was done manually, but now I would like to use the ...
3
votes
2answers
211 views

How to force powershell to refresh cached data? Get-ChildItem results for PSDrive not current

Import-Module WebAdministration $pool = "ChannelServices" $wp = Get-ChildItem "IIS:\AppPools\$pool\WorkerProcesses" Get-Process -Id $wp.processId Restart-WebAppPool $pool sleep 5 Get-ChildItem ...
3
votes
2answers
38 views

How to set IIS Remote Management Restrictions policy using PowerShell (server core)?

I'm setting up an IIS 2012 R2 system in a server core environment. I've enabled the IIS management service and assigned a cert, but can't find how to configure restrictions on what IPs can connect to ...
2
votes
2answers
238 views

Editing/Setting Mime Types with Powershell?

So I was wondering if there is a specific way to change/edit a mime type in IIS 7.5 using powershell? So far I have come across solutions to add mimetypes such as: ...
5
votes
1answer
229 views

How can I change the IIS default document order using Powershell?

How can I make sure default.aspx is the first default document for my IIS website? I have tried: Add-WebConfiguration //defaultDocument/files "IIS:\sites\Default Web Site\MyWebSite" -atIndex 0 ...
1
vote
1answer
203 views

IIS Powershell : Assign an existing SSL binding to a website

I already have an SSL binding created for one of my websites in IIS 7.5. Now I'm adding another website which listens on the same IP and port (443) but uses a different host header. When I try to ...
2
votes
2answers
51 views

Microsoft Exchange Management console, Initilization Failed

Upon starting Exchange Management Console I am presented with the error [###################] Connecting to remote server failed with the following error message : The WinRM client sent a request to ...
0
votes
1answer
118 views

Preventing Windows from deleteing our root CA

I am trying to create a Windows server with an IIS server that has a web site with client certificate authentication. The client certificates are signed by our own root CA. Because of that we must ...
3
votes
1answer
123 views

Will IIS finish pending requests on Stop-WebSite?

Lets' say my IIS8 hosted web site is up and running and happily serving requests. Now, from an elevated Powershell, I run: Stop-WebSite <MyWebSite> My assumption until recently was that IIS ...
0
votes
2answers
75 views

Copying files from one machine to another

I'm currently generating documentation on one machine, and publishing it to a web server using the following commands in a script: net use "\\someShare" PASSWORD /user:username del /S /Q ...
0
votes
1answer
206 views

IIS script privileges with powershell

I've created a script for most of the functions I need when creating a Site for my IIS, however, there is still one thing missing. Namely, I can't seem to find the commands for setting script ...
1
vote
0answers
292 views

IIS Application Request Routing(Monitoring and management) Powershell

I am working with iis arr powershell... In my iis i have one web farm and in that i have two servers "server1" & "server2"...... My task is Make server1 unavailable gracefully restart server1 ...
0
votes
1answer
366 views

How can I get a list of default documents in IIS using PowerShell?

I'm managing a Server Core machine and trying to do everything in PowerShell, which is fun. I need a list of the default documents. From other websites, I've found out how to set and remove them, ...
2
votes
1answer
302 views

Make server unavailable gracefully using Powershell in ARR

We are using ARR as reverse proxy and I would like to make a server unavailable for various reasons. How can this be done using Powershell? Edit 1: I found this ...
1
vote
0answers
139 views

Modifying Authentication on web application / service in IIS(7/.5) via Powershell

I am trying to install a wcf-servce by using New-WebApplication in powershell. It works fine. However, how can I Modify the Authentication? I want to enable Anonymous Access Authentication and disable ...
0
votes
1answer
615 views

Configure anonymous authentication to use app pool identity for a specific site

Instead of flipiping the switch in the GUI to tell IIS to use the Application Pool Identity for Anonymous authentication, I'd like to do this in a powershell script. Scott Forsyth posted a solution ...
0
votes
1answer
105 views

How to set acl on a file in remote website using msdeploy & powershell/psake

I am running a build process in powershell and using msdeploy to deploy a website to a remote server. I need to set acls on a particular file either when the site is deployed or post deployment. What ...
1
vote
2answers
228 views

Win2k8: How to set a 'Deny File Name Extension' rule in IIS?

Does anyone know how to use Powershell to create a 'Deny File Name Extension' rule, so that certain files will not be served by IIS? For example, I want to set a rule to deny all .txt files from ...
1
vote
2answers
256 views

Remote Wildcard script mapping from site in IIS 7.5 with powershell

I created a site in IIS 7.5 via Powershell; however, the site inherited the parent handler mappings and one of the wildcard script mappings causes problems for this particular application. Is there a ...
1
vote
1answer
455 views

Enabling remote connections to IIS 7.x Management Service by using Powershell

Is it possible to execute the "Enable Remote Connections" step from this instructions ("Remote Administration for IIS Manager") using Powershell?
4
votes
3answers
4k views

How can I set IIS Application Pool recycle times without resorting to the ugly syntax of Add-WebConfiguration?

I have been scripting the configuration of our IIS 7.5 instance and through bits and pieces of other peoples scripts I have come up with a syntax that I like: $WebAppPoolUserName = "domain\user" ...
1
vote
2answers
729 views

Getting custom web.config sections and their contents in Powershell

I have a web application installed in c:\inetpub\wwwroot_Site1\AppName which has a custom section group and section as follows: <configSections> <sectionGroup name="Libraries"> ...
1
vote
2answers
830 views

IIS change applications to virtual directories in powershell

Trying to write a script here to do change all applications to virtual directories. I'm using Powershell, but my skills there are a bit weak. Am I using the right tool? Here's what I have so far: cd ...
5
votes
3answers
3k views

How can I add ACL permissions for IIS APPPOOL\* accounts via Powershell?

I want to be able to set the IIS account for new websites to have modify permissions. I have the following script: function Set-ModifyPermission ($directory, $username, $domain = 'IIS APPPOOL') { ...
2
votes
3answers
762 views

Automating help desk tasks using a Powershell web interface

I'm looking into implementing Powershell in a help desk environment to automate routine tasks like unlocking user accounts, resetting passwords, etc. The help desk will be supporting different ...
2
votes
1answer
521 views

Converting WMI from vbscript to powershell

I'm trying to follow the guides for accessing IIS 6 using WMI but I'm having trouble working out how to translate the Get method of SWbemServices as Get-WmiObject doesn't seem to use the same path ...
1
vote
2answers
1k views

How can I update HTTP custom headers in IIS6 using Powershell?

I have the following Powershell script which uses WMI to update the HTTP custom headers on a website in IIS 6. The script seems to work fine, no errors generated, and the resultant $website object ...
2
votes
1answer
2k views

Are there any Powershell modules specifically for IIS6 administration?

I'm looking to manage/administer many IIS6 servers remotely via Powershell (query sites, iis settings, etc). Is this possible? Is there a Microsoft-supported module out there? Or do I have to use ...
14
votes
4answers
19k views

Recycle remote IIS app pool from the command line?

Is it possible to recycle an IIS7 app pool from the command line, on a different machine? I've found APPCMD (appcmd recycle apppool my-app-pool), but it only operates on the host it's run on, AFAICT. ...
5
votes
1answer
1k views

Powershell import-module webadministration

Every time I execute this command invoke-command -computername REMOTEPC -scriptblock { import-module WebAdministration; new-item "$env:systemdrive\inetpub\testsite" -type directory; New-WebSite -Name ...
3
votes
2answers
617 views

Howto use PowerShell to parse IIS logs files

I am looking for samples on howto parse IIS log files. I am just getting started, and rather then search for site, I want personal recommendations how sample sites, sample code or a good book to get ...
2
votes
2answers
913 views

IIS Administration PowerShell Cmdlets on Windows 2008 R1

I am trying to use IIS Administration PowerShell Cmdlets on top of Windows 2008 R1. According to this article you need to load these Cmdlets. However the options to load the cmdlets does not exist in ...
1
vote
0answers
175 views

Is there Powershell way to re-apply a restored password for the IIS IUSR account?

On one of our IIS web servers the IUSR account suddenly expired or got corrupted, I recovered the password from the IIS metabase (using Cscript adsutil.vbs get w3svc\anonymoususerpass after switching ...
3
votes
1answer
482 views

IIS 6 Logging on a webfarm

Is there away in IIS 6 to programmaticly turn on/off logging in a web farm. we have 10 servers and I don't want to when needed log on to each and flip logging on, and then when we are done login and ...
2
votes
2answers
1k views

Integrated Authentication in IIS 6 from the command line

In deploying a new version of our ASP.NET application, we need to set the authentication method for a particular page to be "Integrated only." We can do this from the IIS managment console, but would ...