Inherited Permissions not work on Windows Server 2003

Workaround…

function Get-LocalGroups() {  
    net localgroup | ?{ $_ -match "^\*.*" } | %{ $_.SubString(1) };
}
    
function Get-LocalGroupMembers() {
    param ([string]$groupName = $(throw "Need a group name") )

    $lines = net localgroup $groupName
    $found = $false  
    for ($i = 0; $i -lt $lines.Length; $i++ ) {
        if ( $found ) {      
            if ( -not $lines[$i].StartsWith("The command completed")) {
                $lines[$i]
            }
        }
        elseif ( $lines[$i] -match "^----" ) {
            $found = $true;
        }
    }
} 

function Copy-LocalGroupMembers() {
    param (
        [string]$sourceGroupName = $(throw "Need a sourceGroupName"), 
        [string]$destinationGroupName = $(throw "Need a destinationGroupName") 
        )

    #Checking parameters: source group and destination group existence
    [Array]$allGroups = Get-LocalGroups
    if ($allGroups -eq $null -or $allGroups.Count -eq 0) {
        Write-Output "Warning: Fail to get Users and Groups information"	
        Read-Host "Press any key to exit"
        exit;
    }
    
    if ($allGroups -notcontains $sourceGroupName){
        Write-Output ([System.String]::Format("Warning: {0} doesn't exist", $sourceGroupName));
        Read-Host "Press any key to exit"
        exit;
    }
    
    if ($allGroups -notcontains $destinationGroupName){
        Write-Output ([System.String]::Format("Warning: {0} doesn't exist", $destinationGroupName));
        Read-Host "Press any key to exit"
        exit;
    }
    
    #checking source group contained users
    [Array]$sourceUsers = Get-LocalGroupMembers $sourceGroupName
    [Array]$destinationUsers = Get-LocalGroupMembers $destinationGroupName

    if ($sourceUsers -ne $null -or $sourceUsers.Count -gt 0){
        foreach($su in $sourceUsers){
            try {
                
                if ([string]::IsNullOrEmpty($su)){
                    continue
                }
                elseif ($destinationUsers -notcontains $su) {
                    $null = net localgroup $destinationGroupName $su /ADD
                    Write-Output ([System.String]::Format("{0} added to {1}", $su, $destinationGroupName));
                }
                else {
                    Write-Output ([System.String]::Format("{0} already in {1}", $su, $destinationGroupName));
                }
            }
            catch {
                Write-Output ([System.String]::Format("Exception: Fail to add {0} in {1}", $su, $destinationGroupName));
                Read-Host "Press any key to continue"
                continue
            }
        }
    }
}

###Main###
#Checking OS version
$OS = Get-WmiObject -Class Win32_OperatingSystem
if ($OS -eq $null){
    Write-Output "Error: Fail to detect Windows version."
    Read-Host "Press any key to exit"
    exit
}

if (-not $OS.Version.StartsWith("5.2") -and -not $OS.Caption.Contains("Windows Server 2003")){
    Write-Output $OS.Caption
    Write-Output "No need to apply this script"
    Read-Host "Press any key to exit"
    exit
}

#Adding users if needed
Copy-LocalGroupMembers srcGroup destGroup

Read-Host "Press any key to exit"