GeneralFunctions.ps1

<#
    .NOTES
    ===========================================================================
    Created on: 12/29/2016 2:46 PM
    Created by: Vikas Sukhija
    Organization: https://techwizard.cloud
    Filename: Generalutilities.ps1
    Update: 7/15/2020 Converted to module
    Update: 7/23/2020 updated getauth with validation script
    update: 7/25/2020 rmeoved move-file unused function
    update: 7/25/2020 added read ini contnet function
    update: 7/25/2020 added save-encrypt function
    update: 9/2/2020 added new-randompassword function
    update: 9/16/2020 added get-adrecursive group function
    update: 12/30/2020 added get-adusermemberof function
    update: 4/28/2021 updated Get-ADGroupMembersRecursive function to include groups
    update: 4/1/2022 updated random password to atke any number of chars
    update: 6/8/2022 ADDED Set-IniContent and Out-IniFile from author Sean Seymour <seanjseymour@gmail.com> based on work by Oliver Lipkau <oliver@lipkau.net>
    update: 6/24/2022 ADDED Start-Maintenance Function
    ===========================================================================
    .DESCRIPTION
    General Utilities
#>

######################get AD User member Of######################
Function Get-ADUserMemberOf
{
  Param(
    [Parameter(Mandatory = $true)]
    [ValidateNotNullOrEmpty()]
    [String]$User,
    [Parameter(Mandatory = $true)]
    [ValidateNotNullOrEmpty()]
    [String]$Group
  )
  try{
    $GroupDN = (Get-ADGroup $Group).DistinguishedName
    $UserDN = (Get-ADUser $User).DistinguishedName
    $Getaduser = Get-ADUser -Filter "memberOf -RecursiveMatch '$GroupDN'" -SearchBase $UserDN
    If($Getaduser) {
      $true
    }
    Else { 
      $false 
    }
  }
  catch{

  }
} #Get-ADUserMemberOf
######################get AD recursive group membership######################
Function Get-ADGroupMembersRecursive{
  Param(
    [Parameter(Mandatory = $true,ValueFromPipeline=$true)]
    [ValidateNotNullOrEmpty()]
    [String[]]$Groups,
    [ValidateNotNullOrEmpty()]
    [String[]]$Properties,
    [ValidateSet($true,$false)]
    [string]$ShowGroups
  )
  Begin{
    $Results = @()
    [String[]]$defaultproperties = "distinguishedName","name","objectClass","objectGUID","SamAccountName","SID"
    $Properties+=$defaultproperties
    $Properties = $Properties | Sort-Object -Unique
  }
  Process{
    ForEach($adobj in $Groups){
      $getgroupdn =  (Get-ADGroup -identity $adobj).DistinguishedName
      $findallgroups = Get-ADGroup -identity $getgroupdn -Properties members| Select-Object -ExpandProperty members | get-adobject | Where-Object{$_.objectClass -eq "Group"} |Select DistinguishedName
      $Results+=$getgroupdn
      ForEach($Object in $findallgroups){
        if($ShowGroups -eq $true){
          Get-ADGroupMembersRecursive $Object.DistinguishedName -Properties $Properties -ShowGroups $true
        }
        else{
          Get-ADGroupMembersRecursive $Object.DistinguishedName -Properties $Properties
        }
      }
    }
  }
  End{
    $Results = $Results | Select-Object -Unique
    foreach($item in $Results){
      $arrgroupmembers =@()
      if($ShowGroups -eq $true){
        Get-ADGroup -id $item -Properties $Properties | Select-Object $Properties
      }
      $arrgroupmembers = Get-ADGroup -id $item -Properties members | Select-Object -ExpandProperty members |get-adobject | Where-Object{$_.objectClass -eq "user"} | Get-ADUser -properties $Properties | Select-Object $Properties
      $arrgroupmembers
    }
  }
} #Get-ADGroupMembersRecursive


######################Authentication Function##################################
Function Get-Auth
{
  [CmdletBinding()]
  param
  (
    [Parameter(Mandatory = $true,ParameterSetName = 'file')]
    [Parameter(Mandatory = $true,ParameterSetName = 'encrypt')]
    $userId,
    [Parameter(Mandatory = $true,ParameterSetName = 'file')]
    [ValidateScript({
          if(-Not ($_ | Test-Path) ){throw "File or folder does not exist"}
          if(-Not ($_ | Test-Path -PathType Leaf) ){throw "The Path argument must be a file. Folder paths are not allowed."}
          if($_ -notmatch "(\.txt)"){throw "The file specified in the path argument must be either of type txt"}
          return $true 
    })]
    [System.IO.FileInfo]$passwordfile,
    [Parameter(ParameterSetName = 'file',Position = 0)][switch]$file,
    

    
    [Parameter(ParameterSetName = 'encrypt',Position = 0)][switch]$encrypt,
    [Parameter(Mandatory = $true,ParameterSetName = 'encrypt')]
    [string]$password
  )
    
  switch ($PsCmdlet.ParameterSetName) {
    "file"{
      $encrypted1 = Get-Content $passwordfile
      $pwd = ConvertTo-SecureString -string $encrypted1
      $Credential = New-Object System.Management.Automation.PSCredential -ArgumentList $userId, $pwd
      return $pwd, $Credential
    }
    "encrypt"{
      $pwd = ConvertTo-SecureString -string $password
      $Credential = New-Object System.Management.Automation.PSCredential -ArgumentList $userId, $pwd
      return $pwd, $Credential
    }
  }
}#get-auth

######################read INI files##################################
Function Get-IniContent 
{
  [CmdletBinding()]  
  Param(  
    [ValidateNotNullOrEmpty()]  
    [ValidateScript({(Test-Path $_) -and ((Get-Item $_).Extension -eq ".ini")})]  
    [Parameter(ValueFromPipeline = $true,Mandatory = $true)]  
    [string]$FilePath  
  )  
      
  Begin  
  {Write-Verbose -Message "$($MyInvocation.MyCommand.Name):: Function started"}  
          
  Process  
  {  
    Write-Verbose -Message "$($MyInvocation.MyCommand.Name):: Processing file: $FilePath"  
              
    $ini = @{}  
    switch -regex -file $FilePath  
    {  
      "^\[(.+)\]$" # Section
      {  
        $section = $matches[1]  
        $ini[$section] = @{}  
        $CommentCount = 0  
      }  
      "^(;.*)$" # Comment
      {  
        if (!($section))  
        {  
          $section = "No-Section"  
          $ini[$section] = @{}  
        }  
        $value = $matches[1]  
        $CommentCount = $CommentCount + 1  
        $Name = "Comment" + $CommentCount  
        $ini[$section][$Name] = $value  
      }   
      "(.+?)\s*=\s*(.*)" # Key
      {  
        if (!($section))  
        {  
          $section = "No-Section"  
          $ini[$section] = @{}  
        }  
        $Name, $value = $matches[1..2]  
        $ini[$section][$Name] = $value  
      }  
    }  
    Write-Verbose -Message "$($MyInvocation.MyCommand.Name):: Finished Processing file: $FilePath"  
    Return $ini  
  }  
          
  End  
  {Write-Verbose -Message "$($MyInvocation.MyCommand.Name):: Function ended"}  
} #get-inicontent
##################Set-Inicontent################################################
Function Set-IniContent {
    <#
    .Synopsis
        Updates existing values or adds new key-value pairs to an INI file
 
    .Description
        Updates specified keys to new values in all sections or certain sections.
        Used to add new or change existing values. To comment, uncomment or remove keys use the related functions instead.
        The ini source can be specified by a file or piped in by the result of Get-IniContent.
        The modified content is returned as a ordered dictionary hashtable and can be piped to a file with Out-IniFile.
 
    .Notes
        Author : Sean Seymour <seanjseymour@gmail.com> based on work by Oliver Lipkau <oliver@lipkau.net>
        Source : https://github.com/lipkau/PsIni
                      http://gallery.technet.microsoft.com/scriptcenter/ea40c1ef-c856-434b-b8fb-ebd7a76e8d91
        Version : 1.0.0 - 2016/08/18 - SS - Initial release
                    : 1.0.1 - 2016/12/29 - SS - Removed need for delimiters by making Sections a string array
                                                and NameValuePairs a hashtable. Thanks Oliver!
 
        #Requires -Version 2.0
 
    .Inputs
        System.String
        System.Collections.IDictionary
 
    .Outputs
        System.Collections.Specialized.OrderedDictionary
 
    .Example
        $ini = Set-IniContent -FilePath "C:\myinifile.ini" -Sections 'Printers' -NameValuePairs @{'Name With Space' = 'Value1' ; 'AnotherName' = 'Value2'}
        -----------
        Description
        Reads in the INI File c:\myinifile.ini, adds or updates the 'Name With Space' and 'AnotherName' keys in the [Printers] section to the values specified,
        and saves the modified ini to $ini.
 
    .Example
        Set-IniContent -FilePath "C:\myinifile.ini" -Sections 'Terminals','Monitors' -NameValuePairs @{'Updated=FY17Q2'} | Out-IniFile "C:\myinifile.ini" -Force
        -----------
        Description
        Reads in the INI File c:\myinifile.ini and adds or updates the 'Updated' key in the [Terminals] and [Monitors] sections to the value specified.
        The ini is then piped to Out-IniFile to write the INI File to c:\myinifile.ini. If the file is already present it will be overwritten.
 
    .Example
        Get-IniContent "C:\myinifile.ini" | Set-IniContent -NameValuePairs @{'Headers' = 'True' ; 'Update' = 'False'} | Out-IniFile "C:\myinifile.ini" -Force
        -----------
        Description
        Reads in the INI File c:\myinifile.ini using Get-IniContent, which is then piped to Set-IniContent to add or update the 'Headers' and 'Update' keys in all sections
        to the specified values. The ini is then piped to Out-IniFile to write the INI File to c:\myinifile.ini. If the file is already present it will be overwritten.
 
    .Example
        Get-IniContent "C:\myinifile.ini" | Set-IniContent -NameValuePairs @{'Updated'='FY17Q2'} -Sections '_' | Out-IniFile "C:\myinifile.ini" -Force
        -----------
        Description
        Reads in the INI File c:\myinifile.ini using Get-IniContent, which is then piped to Set-IniContent to add or update the 'Updated' key that
        is orphaned, i.e. not specifically in a section. The ini is then piped to Out-IniFile to write the INI File to c:\myinifile.ini.
 
    .Link
        Get-IniContent
        Out-IniFile
    #>


    [CmdletBinding(DefaultParameterSetName = "File")]
    [OutputType(
        [System.Collections.IDictionary]
    )]
    Param
    (
        # Specifies the path to the input file.
        [Parameter( Position = 0, Mandatory = $true, ParameterSetName = "File" )]
        [ValidateNotNullOrEmpty()]
        [String]
        $FilePath,

        # Specifies the Hashtable to be modified.
        # Enter a variable that contains the objects or type a command or expression that gets the objects.
        [Parameter( Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = "Object")]
        [ValidateNotNullOrEmpty()]
        [System.Collections.IDictionary]
        $InputObject,

        # Hashtable of one or more key names and values to modify. Required.
        [Parameter( Mandatory = $true, ParameterSetName = "File")]
        [Parameter( Mandatory = $true, ParameterSetName = "Object")]
        [ValidateNotNullOrEmpty()]
        [HashTable]
        $NameValuePairs,

        # String array of one or more sections to limit the changes to, separated by a comma.
        # Surrounding section names with square brackets is not necessary but is supported.
        # Ini keys that do not have a defined section can be modified by specifying '_' (underscore) for the section.
        [Parameter( ParameterSetName = "File" )]
        [Parameter( ParameterSetName = "Object" )]
        [ValidateNotNullOrEmpty()]
        [String[]]
        $Sections
    )

    Begin {
        Write-Debug "PsBoundParameters:"
        $PSBoundParameters.GetEnumerator() | ForEach-Object { Write-Debug $_ }
        if ($PSBoundParameters['Debug']) {
            $DebugPreference = 'Continue'
        }
        Write-Debug "DebugPreference: $DebugPreference"
        Write-Verbose "$($MyInvocation.MyCommand.Name):: Function started"

        # Update or add the name/value pairs to the section.
        Function Update-IniEntry {
            param ($content, $section)

            foreach ($pair in $NameValuePairs.GetEnumerator()) {
                if (!($content[$section])) {
                    Write-Verbose ("$($MyInvocation.MyCommand.Name):: '{0}' section does not exist, creating it." -f $section)
                    $content[$section] = New-Object System.Collections.Specialized.OrderedDictionary([System.StringComparer]::OrdinalIgnoreCase)
                }

                Write-Verbose ("$($MyInvocation.MyCommand.Name):: Setting '{0}' key in section {1} to '{2}'." -f $pair.key, $section, $pair.value)
                $content[$section][$pair.key] = $pair.value
            }
        }
    }
    # Update the specified keys in the list, either in the specified section or in all sections.
    Process {
        # Get the ini from either a file or object passed in.
        if ($PSCmdlet.ParameterSetName -eq 'File') { $content = Get-IniContent $FilePath }
        if ($PSCmdlet.ParameterSetName -eq 'Object') { $content = $InputObject }

        # Specific section(s) were requested.
        if ($Sections) {
            foreach ($section in $Sections) {
                # Get rid of whitespace and section brackets.
                $section = $section.Trim() -replace '[][]', ''

                Write-Debug ("Processing '{0}' section." -f $section)

                Update-IniEntry $content $section
            }
        }
        else {
            # No section supplied, go through the entire ini since changes apply to all sections.
            foreach ($item in $content.GetEnumerator()) {
                $section = $item.key

                Write-Debug ("Processing '{0}' section." -f $section)

                Update-IniEntry $content $section
            }
        }
        Write-Output $content
    }
    End {
        Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended"
    }
}
###########################out-ini#############################################
Function Out-IniFile {
    <#
    .Synopsis
        Write hash content to INI file
 
    .Description
        Write hash content to INI file
 
    .Notes
        Author : Oliver Lipkau <oliver@lipkau.net>
        Blog : http://oliver.lipkau.net/blog/
        Source : https://github.com/lipkau/PsIni
                      http://gallery.technet.microsoft.com/scriptcenter/ea40c1ef-c856-434b-b8fb-ebd7a76e8d91
 
        #Requires -Version 2.0
 
    .Inputs
        System.String
        System.Collections.IDictionary
 
    .Outputs
        System.IO.FileSystemInfo
 
    .Example
        Out-IniFile $IniVar "C:\myinifile.ini"
        -----------
        Description
        Saves the content of the $IniVar Hashtable to the INI File c:\myinifile.ini
 
    .Example
        $IniVar | Out-IniFile "C:\myinifile.ini" -Force
        -----------
        Description
        Saves the content of the $IniVar Hashtable to the INI File c:\myinifile.ini and overwrites the file if it is already present
 
    .Example
        $file = Out-IniFile $IniVar "C:\myinifile.ini" -PassThru
        -----------
        Description
        Saves the content of the $IniVar Hashtable to the INI File c:\myinifile.ini and saves the file into $file
 
    .Example
        $Category1 = @{“Key1”=”Value1”;”Key2”=”Value2”}
        $Category2 = @{“Key1”=”Value1”;”Key2”=”Value2”}
        $NewINIContent = @{“Category1”=$Category1;”Category2”=$Category2}
        Out-IniFile -InputObject $NewINIContent -FilePath "C:\MyNewFile.ini"
        -----------
        Description
        Creating a custom Hashtable and saving it to C:\MyNewFile.ini
    .Link
        Get-IniContent
    #>


    [CmdletBinding()]
    [OutputType(
        [System.IO.FileSystemInfo]
    )]
    Param(
        # Adds the output to the end of an existing file, instead of replacing the file contents.
        [switch]
        $Append,

        # Specifies the file encoding. The default is UTF8.
        #
        # Valid values are:
        # -- ASCII: Uses the encoding for the ASCII (7-bit) character set.
        # -- BigEndianUnicode: Encodes in UTF-16 format using the big-endian byte order.
        # -- Byte: Encodes a set of characters into a sequence of bytes.
        # -- String: Uses the encoding type for a string.
        # -- Unicode: Encodes in UTF-16 format using the little-endian byte order.
        # -- UTF7: Encodes in UTF-7 format.
        # -- UTF8: Encodes in UTF-8 format.
        [ValidateSet("Unicode", "UTF7", "UTF8", "ASCII", "BigEndianUnicode", "Byte", "String")]
        [Parameter()]
        [String]
        $Encoding = "UTF8",

        # Specifies the path to the output file.
        [ValidateNotNullOrEmpty()]
        [ValidateScript( {Test-Path $_ -IsValid} )]
        [Parameter( Position = 0, Mandatory = $true )]
        [String]
        $FilePath,

        # Allows the cmdlet to overwrite an existing read-only file. Even using the Force parameter, the cmdlet cannot override security restrictions.
        [Switch]
        $Force,

        # Specifies the Hashtable to be written to the file. Enter a variable that contains the objects or type a command or expression that gets the objects.
        [Parameter( Mandatory = $true, ValueFromPipeline = $true )]
        [System.Collections.IDictionary]
        $InputObject,

        # Passes an object representing the location to the pipeline. By default, this cmdlet does not generate any output.
        [Switch]
        $Passthru,

        # Adds spaces around the equal sign when writing the key = value
        [Switch]
        $Loose,

        # Writes the file as "pretty" as possible
        #
        # Adds an extra linebreak between Sections
        [Switch]
        $Pretty
    )

    Begin {
        Write-Debug "PsBoundParameters:"
        $PSBoundParameters.GetEnumerator() | ForEach-Object { Write-Debug $_ }
        if ($PSBoundParameters['Debug']) {
            $DebugPreference = 'Continue'
        }
        Write-Debug "DebugPreference: $DebugPreference"

        Write-Verbose "$($MyInvocation.MyCommand.Name):: Function started"

        function Out-Keys {
            param(
                [ValidateNotNullOrEmpty()]
                [Parameter( Mandatory, ValueFromPipeline )]
                [System.Collections.IDictionary]
                $InputObject,

                [ValidateSet("Unicode", "UTF7", "UTF8", "ASCII", "BigEndianUnicode", "Byte", "String")]
                [Parameter( Mandatory )]
                [string]
                $Encoding = "UTF8",

                [ValidateNotNullOrEmpty()]
                [ValidateScript( {Test-Path $_ -IsValid})]
                [Parameter( Mandatory, ValueFromPipelineByPropertyName )]
                [Alias("Path")]
                [string]
                $FilePath,

                [Parameter( Mandatory )]
                $Delimiter,

                [Parameter( Mandatory )]
                $MyInvocation
            )

            Process {
                if (!($InputObject.get_keys())) {
                    Write-Warning ("No data found in '{0}'." -f $FilePath)
                }
                Foreach ($key in $InputObject.get_keys()) {
                    if ($key -match "^Comment\d+") {
                        Write-Verbose "$($MyInvocation.MyCommand.Name):: Writing comment: $key"
                        "$($InputObject[$key])" | Out-File -Encoding $Encoding -FilePath $FilePath -Append
                    }
                    else {
                        Write-Verbose "$($MyInvocation.MyCommand.Name):: Writing key: $key"
                        $InputObject[$key] |
                            ForEach-Object { "$key$delimiter$_" } |
                            Out-File -Encoding $Encoding -FilePath $FilePath -Append
                    }
                }
            }
        }

        $delimiter = '='
        if ($Loose) {
            $delimiter = ' = '
        }

        # Splatting Parameters
        $parameters = @{
            Encoding = $Encoding;
            FilePath = $FilePath
        }

    }

    Process {
        $extraLF = ""

        if ($Append) {
            Write-Debug ("Appending to '{0}'." -f $FilePath)
            $outfile = Get-Item $FilePath
        }
        else {
            Write-Debug ("Creating new file '{0}'." -f $FilePath)
            $outFile = New-Item -ItemType file -Path $Filepath -Force:$Force
        }

        if (!(Test-Path $outFile.FullName)) {Throw "Could not create File"}

        Write-Verbose "$($MyInvocation.MyCommand.Name):: Writing to file: $Filepath"
        foreach ($i in $InputObject.get_keys()) {
            if (!($InputObject[$i].GetType().GetInterface('IDictionary'))) {
                #Key value pair
                Write-Verbose "$($MyInvocation.MyCommand.Name):: Writing key: $i"
                "$i$delimiter$($InputObject[$i])" | Out-File -Append @parameters

            }
            elseif ($i -eq $script:NoSection) {
                #Key value pair of NoSection
                Out-Keys $InputObject[$i] `
                    @parameters `
                    -Delimiter $delimiter `
                    -MyInvocation $MyInvocation
            }
            else {
                #Sections
                Write-Verbose "$($MyInvocation.MyCommand.Name):: Writing Section: [$i]"

                # Only write section, if it is not a dummy ($script:NoSection)
                if ($i -ne $script:NoSection) { "$extraLF[$i]"  | Out-File -Append @parameters }
                if ($Pretty) {
                    $extraLF = "`r`n"
                }

                if ( $InputObject[$i].Count) {
                    Out-Keys $InputObject[$i] `
                        @parameters `
                        -Delimiter $delimiter `
                        -MyInvocation $MyInvocation
                }

            }
        }
        Write-Verbose "$($MyInvocation.MyCommand.Name):: Finished Writing to file: $FilePath"
    }

    End {
        if ($PassThru) {
            Write-Debug ("Returning file due to PassThru argument.")
            Write-Output (Get-Item $outFile)
        }
        Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended"
    }
}
#############Checkgroup used for checking group in user acces extract###########
function Group-Validate
{
  [CmdletBinding()]
  param
  (
    [Parameter(Mandatory = $true,
    ValueFromPipelineByPropertyName = $true)]
    $User,
    [Parameter(Mandatory = $true)]
    $dom,
    $greport
  )
    
  begin
  {
    Write-Host "Start Checking objects for group validation" -ForegroundColor Green
    $coll = @()
    $cdom = $dom + "\" + "*"
  }
  process
  {
    if ($User -like $cdom)
    {
      $User = [string]$User
      try
      {if (Get-Group $User -ErrorAction Stop) { $coll += $User }}
      catch
      {
        Write-Host "$User is not a valid group" -ForegroundColor yellow
        Add-Content $greport $User
      }
    }
  }
  end
  {
    Write-Host "----------end---------------" -ForegroundColor Green
    return $coll
  }
}
 
#################Check if folder is created##################

function New-FolderCreation
{
  [CmdletBinding()]
  param
  (
    [Parameter(Mandatory = $true)]
    [string]$foldername
  )
    

  $logpath  = (Get-Location).path + "\" + "$foldername" 
  $testlogpath = Test-Path -Path $logpath
  if($testlogpath -eq $false)
  {
    #Start-ProgressBar -Title "Creating $foldername folder" -Timer 10
    $null = New-Item -Path (Get-Location).path -Name $foldername -Type directory
  }
}
#########Random Password##############
Function New-RandomPassword{
  [CmdletBinding()]
  param
  (
    [Parameter(Mandatory = $true)]
    [int]$NumberofChars
  )
  switch ($NumberofChars){
    $NumberofChars {
      $Password = $null
      $Password += ([char[]]([char]33..[char]122) | sort {Get-Random})[0..$NumberofChars] -join '' 
      $arrpassword = $Password.ToChararray()
      $randomarr = $arrpassword | Get-Random -Count $arrpassword.Length
      $Password = -join $randomarr
      return $Password
    }
  }
}
#######################Create Encryted password###############
Function Save-EncryptedPassword 
{
  [CmdletBinding()]
  param
  (
    [Parameter(Mandatory = $true)]
    [string]$password,
    [Parameter(Mandatory = $true)]
    [ValidateScript({
          if($_ -notmatch "(\.txt)"){throw "The file specified in the path argument must be either of type txt"}
          return $true 
    })]
    [System.IO.FileInfo]$path
  )
  $secure = ConvertTo-SecureString $password -force -asPlainText
  $bytes = ConvertFrom-SecureString $secure
  $bytes | Out-File $path -Encoding unicode
}#Save-EncryptedPassword
#######################Start Maintenance###########################
Function Start-Maintenance
{
  [CmdletBinding()]
  param
  (
    [Parameter(Mandatory = $true)]
    [string]$StartDay,
    [Parameter(Mandatory = $true)]
    [string]$EndDay,
    [Parameter(Mandatory = $true)]
    [string]$StartHour,
    [Parameter(Mandatory = $true)]
    [string]$EndHour,
    $logpath=$log
  )
  
  $currentdatetime =  Get-Date
  if($StartDay -eq $EndDay){
  if (($currentdatetime.DayOfweek -eq $StartDay) -and ($currentdatetime.TimeOfDay.Hours -gt $StartHour) -and ($currentdatetime.TimeOfDay.Hours -lt $EndHour)){
      Write-log -message "Exiting script - maintenance window - $currentdatetime" -path $logpath
      exit
  }
}else{
  if (($currentdatetime.DayOfweek -eq $StartDay) -and ($currentdatetime.TimeOfDay.Hours -ge $StartHour)){
      Write-log -message "Exiting script - maintenance window - $currentdatetime" -path $logpath
      exit
      }
  if (($currentdatetime.DayOfweek -eq $EndDay) -and ($currentdatetime.TimeOfDay.Hours -le $EndHour)){
      Write-log -message "Exiting script - maintenance window - $currentdatetime" $logpath
      exit
      }
}
}#Start-Maintenance
##########################################################################
# SIG # Begin signature block
# MIIjcwYJKoZIhvcNAQcCoIIjZDCCI2ACAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU0KNuRMCQAuvnU2sOGNIhesVp
# zc6ggh2RMIIFKDCCBBCgAwIBAgIQBBcjfnd2/0lPtk4Ac2XkEzANBgkqhkiG9w0B
# AQsFADByMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD
# VQQLExB3d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFz
# c3VyZWQgSUQgQ29kZSBTaWduaW5nIENBMB4XDTIwMDcwODAwMDAwMFoXDTIzMDcx
# MzEyMDAwMFowZTELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFyaW8xFDASBgNV
# BAcTC01pc3Npc3NhdWdhMRYwFAYDVQQKEw1WaWthcyBTdWtoaWphMRYwFAYDVQQD
# Ew1WaWthcyBTdWtoaWphMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
# 4St8d9DqmfWYRMXs9ampsHh6qVG4kVEaB1AA9GS9itVGUgtkz+18W5mSvpymVX7e
# 795HGUCqR5GfNuJEr6jCaLXZmfDmi3M8m5lFJvqCbV1IZtlN9rLYlcKC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