<commit_before>﻿#Requires -Version 3.0

#-- Prerequisite OS Setting Module Functions --#

<#
.SYNOPSIS 
Create New Firewall Rule for PowerShell Remoting

.DESCRIPTION
Will allow PowerShell Remoting port for firewall

.NOTES
Author: guitarrapc
Created: 18/Jul/2013

.EXAMPLE
Enable-PSRemotingFirewallRule
--------------------------------------------
Add PowerShellRemoting-In accessible rule to Firewall.
#>
function New-ValentiaPSRemotingFirewallRule
{
    [CmdletBinding()]
    param
    (
        [Parameter(
            Position = 0,
            Mandatory = 0,
            HelpMessage = "Input PowerShellRemoting-In port. default is 5985")]
        [int]
        $PSRemotePort = 5985,

        [Parameter(
            Position = 1,
            Mandatory = 0,
            HelpMessage = "Input Name of Firewall rule for PowerShellRemoting-In.")]
        [string]
        $Name = "PowerShellRemoting-In",

        [Parameter(
            Position = 2,
            Mandatory = 0,
            HelpMessage = "Input Decription of Firewall rule for PowerShellRemoting-In.")]
        [string]
        $Description = "Windows PowerShell Remoting required to open for public connection. not for private network.",

        [Parameter(
            Position = 2,
            Mandatory = 0,
            HelpMessage = "Input Group of Firewall rule for PowerShellRemoting-In.")]
        [string]
        $Group = "Windows Remote Management"
    )

    $ErrorActionPreference = $valentia.errorPreference
    Set-StrictMode -Version latest

    if (-not((Get-NetFirewallRule | where Name -eq $Name) -and (Get-NetFirewallPortFilter -Protocol TCP | where Localport -eq $PSRemotePort)))
    {
        Write-Verbose ("Windows PowerShell Remoting port TCP $PSRemotePort was not opend. Set new rule '{1}'" -f $PSRemotePort, $Name)
        New-NetFirewallRule `
            -Name $Name `
            -DisplayName $Name `
            -Description $Description `
            -Group $Group `
            -Enabled True `
            -Profile Any `
            -Direction Inbound `
            -Action Allow `<commit_msg>change Firewall rule name to Windows Standard<commit_after>﻿#Requires -Version 3.0

#-- Prerequisite OS Setting Module Functions --#

<#
.SYNOPSIS 
Create New Firewall Rule for PowerShell Remoting

.DESCRIPTION
Will allow PowerShell Remoting port for firewall

.NOTES
Author: guitarrapc
Created: 18/Jul/2013

.EXAMPLE
Enable-PSRemotingFirewallRule
--------------------------------------------
Add PowerShellRemoting-In accessible rule to Firewall.
#>
function New-ValentiaPSRemotingFirewallRule
{
    [CmdletBinding()]
    param
    (
        [Parameter(
            Position = 0,
            Mandatory = 0,
            HelpMessage = "Input PowerShellRemoting-In port. default is 5985")]
        [int]
        $PSRemotePort = 5985,

        [Parameter(
            Position = 1,
            Mandatory = 0,
            HelpMessage = "Input Name of Firewall rule for PowerShellRemoting-In.")]
        [string]
        $Name = "Windows Remote Management (HTTP-In)",

        [Parameter(
            Position = 2,
            Mandatory = 0,
            HelpMessage = "Input Decription of Firewall rule for PowerShellRemoting-In.")]
        [string]
        $Description = "Windows PowerShell Remoting required to open for public connection. not for private network.",

        [Parameter(
            Position = 2,
            Mandatory = 0,
            HelpMessage = "Input Group of Firewall rule for PowerShellRemoting-In.")]
        [string]
        $Group = "Windows Remote Management"
    )

    $ErrorActionPreference = $valentia.errorPreference
    Set-StrictMode -Version latest

    if (-not((Get-NetFirewallRule | where Name -eq $Name) -and (Get-NetFirewallPortFilter -Protocol TCP | where Localport -eq $PSRemotePort)))
    {
        Write-Verbose ("Windows PowerShell Remoting port TCP $PSRemotePort was not opend. Set new rule '{1}'" -f $PSRemotePort, $Name)
        New-NetFirewallRule `
            -Name $Name `
            -DisplayName $Name `
            -Description $Description `
            -Group $Group `
            -Enabled True `
            -Profile Any `
            -Direction Inbound `
            -Action Allow `
{'fraction_non_alphanumeric': 0.10581010864430798, 'fraction_numerical': 0.011809163911195087, 'mean_word_length': 2.025, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3438452', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1136, 'n_words': 351}