Reputation: 13
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
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