DSCResources/xIISMail/Test.ps1

                                 $Has = @{
           SiteName = "hphsite";
           DeliveryMethod = "PickupDirectoryFromIis" ;
           DefaultCredentials  = $false;
           MailHost = "asdasda.xxxx";
           From  = "sdas@sdad.com" 
           username = "asdads\asdasd"
           password = "123.com"
           PickupDirectoryLocation = "x:\asdasasd"
        }



Test-iisxTargetResource @has -Verbose
set-iisxTargetResource @has -Verbose



Configuration xx
{
    Import-DscResource -module admin*
    Node Localhost
    {
        xIISMail Mail
        {
            MailHost = "mail.hphr.com"
            DefaultCredentials = $true
            Port = 25
            From = "isrvice@hpghr.com"
            DeliveryMethod = "network"
            sitename= "hphsite"
        }
    }
}

xx 
Start-DscConfiguration .\xx -Wait -Verbose -Force