我需要通过powershell以编程方式为winrm / config / service设置RootSDDL
PS C:\Windows\system32> winrm set winrm/config/service @{RootSDDL="O:NSG:BAD:P(A;;GA;;;BA)(A;;GA;;;RM)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)"}
Error: Invalid use of command line. Type "winrm -?" for help.
PS C:\Windows\system32>
winrm get winrm/config/service
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = true [Source="GPO"]
Auth
Basic = true [Source="GPO"]
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = * [Source="GPO"]
IPv6Filter = * [Source="GPO"]
EnableCompatibilityHttpListener = true [Source="GPO"]
EnableCompatibilityHttpsListener = true [Source="GPO"]
CertificateThumbprint
AllowRemoteAccess = true [Source="GPO"]
https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#non-administrator-accounts https://www.sevecek.com/Lists/Posts/Post.aspx?ID=280
答案 0 :(得分:0)
您可以使用https://example.com/laravel-project?test=value
cmdlet设置一些选项:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/set-pssessionconfiguration?view=powershell-6
或者如果您对winrm / config / service设置感兴趣,则可以通过WSMan提供程序浏览它们:Set-PSSessionConfiguration
并使用cd wsmna:\localhost\service
cmdlet(*-item
,Get-Item
和等等)。
如果您想在Set-Item
中查看其他WSMan详细信息。
在powershell中,您可以创建一个自定义Endpoit,以连接和限制PowerShell语言和可用的cmdlet。更多详细信息:https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/jea/overview?view=powershell-6
希望它能成功! 最好的祝福, 伊万