ユーザ用ツール

サイト用ツール


it技術:powershell

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
it技術:powershell [2019/07/24 13:00] – [値を編集して出力] yajuadminit技術:powershell [2019/07/24 13:07] – [IISのDefault Web Siteの値取得] yajuadmin
行 25: 行 25:
  
 ==== IISのDefault Web Siteの値取得 ==== ==== IISのDefault Web Siteの値取得 ====
 +Default Web Siteの値を取得する
 +<code powershell>
 +PS > Get-ItemProperty 'IIS:\Sites\Default Web Site\' | Select *
 +
 +name                       : Default Web Site
 +id                         : 1
 +serverAutoStart            : True
 +state                      : Started
 +bindings                   : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +limits                     : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +logFile                    : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +traceFailedRequestsLogging : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +applicationDefaults        : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +virtualDirectoryDefaults   : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +ftpServer                  : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
 +Collection                 : {Microsoft.IIs.PowerShell.Framework.ConfigurationElement, Microsoft.IIs.PowerShell.Framework.ConfigurationElement, Microsoft.IIs.PowerShell.Framewor
 +                             k.ConfigurationElement, Microsoft.IIs.PowerShell.Framework.ConfigurationElement...}
 +applicationPool            : DefaultAppPool
 +enabledProtocols           : http
 +physicalPath               : %SystemDrive%\inetpub\wwwroot
 +userName                   : 
 +password                   : 
 +ItemXPath                  : /system.applicationHost/sites/site[@name='Default Web Site' and @id='1']
 +PSPath                     : WebAdministration::\\GOUNN2\Sites\Default Web Site\
 +PSParentPath               : WebAdministration::\\GOUNN2\Sites
 +PSChildName                : Default Web Site\
 +PSDrive                    : IIS
 +PSProvider                 : WebAdministration
 +PSIsContainer              : True
 +Attributes                 : {name, id, serverAutoStart, state}
 +ChildElements              : {bindings, limits, logFile, traceFailedRequestsLogging...}
 +ElementTagName             : site
 +Methods                    : {Start, Stop}
 +Schema                     : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema
 +</code>
 +
 ASPプロパティ内のセッションプロパティの値を取得する。 ASPプロパティ内のセッションプロパティの値を取得する。
 <code powershell> <code powershell>
 PS > Get-WebConfiguration system.webServer/asp/session -Location 'Default Web Site' PS > Get-WebConfiguration system.webServer/asp/session -Location 'Default Web Site'
 +
 +PS > Get-WebConfiguration -PSPath 'MACHINE/WEBROOT/APPHOST/Default Web Site' system.webServer/asp/session 
 +
 +PS > Get-WebConfigurationProperty -Location 'Default Web Site' -Filter "system.webServer/asp/session" -Name "."
 +
 +PS > Get-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST/Default Web Site' -Filter "system.webServer/asp/session" -Name "."
 </code> </code>
 ==== 二重引用符はエスケープ ==== ==== 二重引用符はエスケープ ====
it技術/powershell.txt · 最終更新: 2019/07/24 13:09 by yajuadmin