Zobrazení skupin pravidel firewallu
Get-NetFirewallRule | Select DisplayGroup -Unique | Sort DisplayGroup
Vyfiltrování určité skupiny
Get-NetFirewallRule | Where { $_.DisplayGroup –Eq “Remote Volume Management”} | Format-Table
Povolení Volume Managementu
Enable-NetFirewallRule -name RVM-RPCSS-In-TCP,RVM-VDSLDR-In-TCP,RVM-VDS-In-TCP
povolit službu VDS
sc config vds start=auto
net start vds
Na klientu
Enable-NetFirewallRule -name RVM-RPCSS-In-TCP,RVM-VDSLDR-In-TCP,RVM-VDS-In-TCP
Enable-NetFirewallRule -name RVM-RPCSS-In-TCP-NoScope,RVM-VDSLDR-In-TCP-NoScope,RVM-VDS-In-TCP-NoScope
Povolení EventLog Vieweru
enable-netfirewallrule –name RemoteEventLog*
Povolení WMI (je potřeba pro správné fungování například SQL Server Manageru)
Enable-NetFirewallRule -Name WMI-RPCSS-In-TCP,WMI-WINMGMT-In-TCP
Nastavení sdílení
New-SmbShare -Name "<sharename>" -Path "C:\Path\To\Share" -FullAccess "Domain\User" -ChangeAccess "Domain\User2" -ReadAccess "Domain\User3"
Revoke-SmbShareAccess -Name "<sharename>" -AccountName "Domain\User"
Grant-SmbShareAccess -Name "<sharename>" -AccountName "Domain\User" -AccessRight Full|Change|Read
Get-SmbShareAccess -Name "<sharename>"