ADFSDiagnostics.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#Requires -Version 4
#Requires -RunAsAdministrator

<#
 
.SYNOPSIS
    Contains data gathering, health checks, and additional utilities for AD FS server deployments.
 
.DESCRIPTION
 
    Version: 3.0.2
 
    ADFSDiagnostics.psm1 is a Windows PowerShell module for diagnosing issues with ADFS
 
 
.DISCLAIMER
    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
    PARTICULAR PURPOSE.
 
    Copyright (c) Microsoft Corporation. All rights reserved.
#>


$Script:ModuleVersion = "3.0.2"

Function Write-DeprecationNotice
{
    Write-Host "This module has been deprecated, please use ADFSToolbox." -BackgroundColor DarkYellow -ForegroundColor Black
    Write-Host "You can find more information at https://github.com/Microsoft/adfsToolbox" -BackgroundColor DarkYellow -ForegroundColor Black
}

Write-DeprecationNotice

#Get public and private function definition files.
Write-Debug "Importing public and private functions"

$Public = @(Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue)
$Private = @(Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue)
#Dot source the files
foreach ($import in @($Public + $Private))
{
    try
    {
        . $import.fullname
    }
    catch
    {
        Write-Error -Message "Failed to import script $($import.fullname): $_"
    }
}

Export-ModuleMember -Function $Public.Basename