Tim
Tim

Reputation: 13

set property syntax in Powershell

I am new to PowerShell, I am trying to change a property of an IIS website using the following syntax (which doesn't work)

(get-item 'IIS:\Sites\Default Website').logFile.directory = 'd:\'

It doesn't show any error but doesn't change the property either.

Anybody help?

Upvotes: 1

Views: 1200

Answers (1)

Jay Bazuzi
Jay Bazuzi

Reputation: 46496

You may need either:

Set logFile to a new value with the correct directory

or

Set-ItemProperty 'IIS:\Sites\Default Website' -name ...

Upvotes: 3

Related Questions