Powershell console

The MID Server Console for Powershell is very helpful when designing and troubleshooting powershell actions on the MID Server.

Example - Testing a Powershell Library

Console

Target Server: 127.0.0.1 (localhost)

Command

# Import the CommonUtils module
Import-Module "./scripts/Powershell/CommonUtils.psm1"

# Define test cases
$testCases = @(
    "\\server\share\folder",
    "C:\Users\John",
    "\\192.168.1.1\share",
    "D:\Data"
)

# Run tests
foreach ($path in $testCases) {
    $result = isUncPath -path $path
    Write-Host "Path: $path"
    Write-Host "Is UNC: $result"
    Write-Host "----------------------"
}

Result

Path: \\server\share\folder
Is UNC: True
----------------------
Path: C:\Users\John
Is UNC: False
----------------------
Path: \\192.168.1.1\share
Is UNC: True
----------------------
Path: D:\Data
Is UNC: False
----------------------

Last updated