vsadmin.psm1

<#
    ===========================================================================
    Created on: 7/15/2020 1:32 PM
    Created by: Vikas Sukhija
    Organization: https://techwizard.cloud
    Filename: vsdmin.psm1
    ===========================================================================
    .DESCRIPTION
    This module is colelction of Script functions that are used repetetively
#>

############fetch all functionscripts####################
Get-ChildItem -Path "$PSScriptRoot\*.ps1" | % { . $_.FullName }


# SIG # Begin signature block
# MIIccAYJKoZIhvcNAQcCoIIcYTCCHF0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUDxnM+6v8d05LZxojN7vc18pf
# NMGgghefMIIFKDCCBBCgAwIBAgIQBBcjfnd2/0lPtk4Ac2XkEzANBgkqhkiG9w0B
# AQsFADByMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD
# VQQLExB3d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFz
# c3VyZWQgSUQgQ29kZSBTaWduaW5nIENBMB4XDTIwMDcwODAwMDAwMFoXDTIzMDcx
# MzEyMDAwMFowZTELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFyaW8xFDASBgNV
# BAcTC01pc3Npc3NhdWdhMRYwFAYDVQQKEw1WaWthcyBTdWtoaWphMRYwFAYDVQQD
# Ew1WaWthcyBTdWtoaWphMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
# 4St8d9DqmfWYRMXs9ampsHh6qVG4kVEaB1AA9GS9itVGUgtkz+18W5mSvpymVX7e
# 795HGUCqR5GfNuJEr6jCaLXZmfDmi3M8m5lFJvqCbV1IZtlN9rLYlcKCVzwvRm2y
# ctcdFSLzB1spKm/15gjyt546JdVtQe5uzvf4Rcf5SUOIIyzsunA/JWPK3mjQkx0F
# ygeN1Ei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