RaandreeSamplerTest2.psm1

#Region './Private/Get-PrivateFunction.ps1' -1

function Get-PrivateFunction
{
    <#
      .SYNOPSIS
      This is a sample Private function only visible within the module.

      .DESCRIPTION
      This sample function is not exported to the module and only return the data passed as parameter.

      .EXAMPLE
      $null = Get-PrivateFunction -PrivateData 'NOTHING TO SEE HERE'

      .PARAMETER PrivateData
      The PrivateData parameter is what will be returned without transformation.

      #>

    [cmdletBinding()]
    [OutputType([string])]
    param
    (
        [Parameter()]
        [String]
        $PrivateData
    )

    process
    {
        Write-Output $PrivateData
    }

}
#EndRegion './Private/Get-PrivateFunction.ps1' 32
#Region './Public/Get-CurrentDateTime.ps1' -1

<#
.SYNOPSIS
Returns the current date and time.

.DESCRIPTION
The Get-CurrentDateTime function returns the current system date and time as a string in ISO 8601 format.

.EXAMPLE
Get-CurrentDateTime
Returns a string like: 2025-08-13T14:23:45

.NOTES
Author: Raandree
#>

function Get-CurrentDateTime {
    [CmdletBinding()]
    param ()
    return (Get-Date).ToString('yyyy-MM-ddTHH:mm:ss')
}
#EndRegion './Public/Get-CurrentDateTime.ps1' 20
#Region './Public/Get-OsVersionString.ps1' -1

<#
.SYNOPSIS
Returns a string describing the current operating system version, platform, and service pack.

.DESCRIPTION
The Get-OsVersionString function retrieves the OS version information from the .NET System.Environment class and formats it as a string.

.EXAMPLE
Get-OsVersionString
Returns a string like:
Version: 10.0.19045.0, Platform: Win32NT, Service Pack:

.NOTES
Author: Raandree
#>

function Get-OsVersionString
{
    $osVersion = [System.Environment]::OSVersion
    return "Version: $($osVersion.Version), Platform: $($osVersion.Platform), Service Pack: $($osVersion.ServicePack)"
}
#EndRegion './Public/Get-OsVersionString.ps1' 21
#Region './Public/Get-Something.ps1' -1

function Get-Something
{
    <#
      .SYNOPSIS
      Sample Function to return input string.

      .DESCRIPTION
      This function is only a sample Advanced function that returns the Data given via parameter Data.

      .EXAMPLE
      Get-Something -Data 'Get me this text'


      .PARAMETER Data
      The Data parameter is the data that will be returned without transformation.

    #>

    [cmdletBinding(
        SupportsShouldProcess = $true,
        ConfirmImpact = 'Low'
    )]
    param
    (
        [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [String]
        $Data
    )

    process
    {
        if ($pscmdlet.ShouldProcess($Data))
        {
            Write-Verbose -Message ('Returning the data: {0}' -f $Data)
            Get-PrivateFunction -PrivateData $Data
        }
        else
        {
            Write-Verbose -Message 'oh dear'
        }
    }
}
#EndRegion './Public/Get-Something.ps1' 42