<commit_before>﻿<#

.SYNOPSIS 

    This Azure/OMS Automation runbook creates a new VM and onboards it as a hybrid worker. (1/2)


.DESCRIPTION

    This Azure/OMS Automation runbook creates a new VM and onboards it as a hybrid worker. An OMS 
    workspace will be generated if needed. The major steps of the script are outlined below.
    
    1) Login to an Azure account
    2) Import/Update the necessary modules
    3) Import Install-VmAndWorker for next steps


.PARAMETER IDString

    Optional. A string added to newly generated resources to create unique identifiers. If not specified,

    a random number (Maximum of 99999) is used.

 
.PARAMETER WorkspaceName

    Optional. The name of the OMS Workspace to be referenced. If not specified, a new OMS workspace 

    is created, referencing the IDString in order to create a unique identifier.


.PARAMETER OmsLocation

    Optional. The region of the OMS Workspace to be referenced. If not specified, the closest valid

    region to the Automation account is chosen.


.PARAMETER VMName

    Optional. The computer name of the Azure VM to be referenced. If not specified, a computer name

    is created, referencing the IDString in order to create a unique identifier.


.PARAMETER VmLocation

    Optional. The region of the Azure VM. If not specified, "eastus" is used.


.PARAMETER VmResourceGroup

    Optional. The resource group of the VM to be referenced. If not specified, resource group of the 
    
    Automation account is used.


.PARAMETER VMUser

    Optional. The username for the provided user machine. If not specified,"hybridUser" is used.


.PARAMETER VMPassword

    Optional. The password for the provided user on the machine. If not specified,"<PASSWORD>" is used.


.PARAMETER AvailabilityName

    Optional. The name of the Availability set to be referenced. If not specified, a new availability set 

    is created, referencing the VM name and IDString in order to create a unique identifier.


.PARAMETER StorageName

    Optional. The name of the Storage account to be referenced. If not specified, a new storage account 

    is created, referencing the vm name and IDString in order to create a unique identifier.


.PARAMETER OSDiskName

    Optional. The name of the OS Disk to be referenced. If not specified, a new OS Disk is created 

    with the VM name and "-osdisk" as the os disk name.


.PARAMETER VNetName

    Optional. The name of the virtual network to be referenced. If not specified, a new virtual network

    is created with the VM name and "-vnet" as the virtal network name.


.PARAMETER PIpName

    Optional. The Public IP address name to be referenced. If not specified, a new public IP address is 

    created with the VM name and "-ip" as the public IP address name.


.PARAMETER InterfaceName

    Optional. The name of the network interface to be referenced. If not specified, a new interface is

    created, referencing the vm name and IDString in order to create a unique identifier.


.EXAMPLE

    New-HybridWorker

    New-HybridWorker -WorkspaceName "ContosoWorkspace"


.NOTES

    AUTHOR: <NAME>, Azure/OMS Automation Team

    LASTEDIT: Octoper 17, 2016  

#>

Param (
    # Setup base identifier variable
    [Parameter(Mandatory=$false)]
    [String] $IDString = (Get-Random -Maximum 99999),

    # OMS Workspace
    [Parameter(Mandatory=$false)]
    [String] $WorkspaceName = "hybridworker" + $IDstring,
<commit_msg>Typo fix<commit_after>﻿<#

.SYNOPSIS 

    This Azure/OMS Automation runbook creates a new VM and onboards it as a hybrid worker. (1/2)


.DESCRIPTION

    This Azure/OMS Automation runbook creates a new VM and onboards it as a hybrid worker. An OMS 
    workspace will be generated if needed. The major steps of the script are outlined below.
    
    1) Login to an Azure account
    2) Import/Update the necessary modules
    3) Import Install-VmAndWorker for next steps


.PARAMETER IDString

    Optional. A string added to newly generated resources to create unique identifiers. If not specified,

    a random number (Maximum of 99999) is used.

 
.PARAMETER WorkspaceName

    Optional. The name of the OMS Workspace to be referenced. If not specified, a new OMS workspace 

    is created, referencing the IDString in order to create a unique identifier.


.PARAMETER OmsLocation

    Optional. The region of the OMS Workspace to be referenced. If not specified, the closest valid

    region to the Automation account is chosen.


.PARAMETER VMName

    Optional. The computer name of the Azure VM to be referenced. If not specified, a computer name

    is created, referencing the IDString in order to create a unique identifier.


.PARAMETER VmLocation

    Optional. The region of the Azure VM. If not specified, "eastus" is used.


.PARAMETER VmResourceGroup

    Optional. The resource group of the VM to be referenced. If not specified, resource group of the 
    
    Automation account is used.


.PARAMETER VMUser

    Optional. The username for the provided user machine. If not specified,"hybridUser" is used.


.PARAMETER VMPassword

    Optional. The password for the provided user on the machine. If not specified,"<PASSWORD>" is used.


.PARAMETER AvailabilityName

    Optional. The name of the Availability set to be referenced. If not specified, a new availability set 

    is created, referencing the VM name and IDString in order to create a unique identifier.


.PARAMETER StorageName

    Optional. The name of the Storage account to be referenced. If not specified, a new storage account 

    is created, referencing the vm name and IDString in order to create a unique identifier.


.PARAMETER OSDiskName

    Optional. The name of the OS Disk to be referenced. If not specified, a new OS Disk is created 

    with the VM name and "-osdisk" as the os disk name.


.PARAMETER VNetName

    Optional. The name of the virtual network to be referenced. If not specified, a new virtual network

    is created with the VM name and "-vnet" as the virtal network name.


.PARAMETER PIpName

    Optional. The Public IP address name to be referenced. If not specified, a new public IP address is 

    created with the VM name and "-ip" as the public IP address name.


.PARAMETER InterfaceName

    Optional. The name of the network interface to be referenced. If not specified, a new interface is

    created, referencing the vm name and IDString in order to create a unique identifier.


.EXAMPLE

    New-HybridWorker

    New-HybridWorker -WorkspaceName "ContosoWorkspace"


.NOTES

    AUTHOR: <NAME>, Azure/OMS Automation Team

    LASTEDIT: October 17, 2016  

#>

Param (
    # Setup base identifier variable
    [Parameter(Mandatory=$false)]
    [String] $IDString = (Get-Random -Maximum 99999),

    # OMS Workspace
    [Parameter(Mandatory=$false)]
    [String] $WorkspaceName = "hybridworker" + $IDstring,

{'fraction_non_alphanumeric': 0.04779145546705286, 'fraction_numerical': 0.0060825488776249095, 'mean_word_length': 3.2109756097560975, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5925014', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1799, 'n_words': 963}