fake watches replica watches cheapfakewatch.net fake rolex rolex replica replica rolex watches fakekonstantinchaykin.com replica rolex watches https://fake-richardmille.com fakerolex replica watches https://fakewatcherolex.net/ https://fakewatches.icu/ fake-watches.icu https://fake-watches.org/ https://fake-watches.top/ genuinereplicawatches.com fake watches fake watches replica rolex

Product

What is ATPowerForm?

ATPowerForm is a graphical web rendering engine for PowerShell where the script contains the bulk (or all) the business logic necessary for execution and validation, while the user interface becomes completely web based. The implementation can be as simple as the execution of a script and capturing its console output or as complex as the creation of a complete interactive forms with textboxes, buttons, and grids with multiple pages. This allows any PowerShell scripts to be used in a centralized and convenient online Script library that can be accessed from anywhere, even by mobile devices. ATPowerForm produces a robust and flexible interface with limited web programming knowledge, no specially designed PowerShell programming tools are needed, and no complete rewrites of existing scripts are necessary, because most scripts can be designed to run from both the command line and/or graphically.

Native Scripts

Most native PowerShell scripts can executed without modification. All rendered script output will be presented in a simulated web console control. 

<#
.SYNOPSIS
    Tutorial - Services - Step 1
.DESCRIPTION
    The following script displays a list of services
.NOTES
    Script Name:        Services_Step_1.ps1
    Version:            1.0
    Author:               NuDigital Solutions
    Creation Date:        08/01/2014
#>
param(
    [string]$ServerName = ""
)

# Assign Server Parameter
if ($ServerName -ne "") {
    $Result = get-service -ComputerName $ServerName | select-object Name,DisplayName,Status
} Else {
    $Result = get-service | select-object Name,DisplayName,Status
}
#write-Output $Result  | ConvertTo-HTML -Fragment
Write-Output $Result

Interactive

A fully interactive feel can be created with vary little script modification and no web programming experience.

<#
.SYNOPSIS
Tutorial - Services - Step 2
.DESCRIPTION
The following script displays a list of services
.NOTES
Script Name:        External_PS_Script_Demo.ps1
Version:            1.0
Author:           NuDigital Solutions
Creation Date:    05/01/2014
#>
param(
[string]$pfCMD = "",
[int]$pfField,
[hashtable]$pfFields = @{},
[hashtable]$pfDetails = @{},
[hashtable]$pfGlobals = @{},
[string]$pfModPath = $Env:ATPowerForm,
[string]$ServerName = ""
)
################################
# Load ATPowerForm Interfaces
$pfScriptPath = $MyInvocation.MyCommand.Path;
. $pfModPath\ATPowerForm.ps1;
################################

<#
.SYNOPSIS
Optional method to create ATPowerForm control definitions for rendoring in the UI
#>
function pfPaint
{
# Display Text Box for Server input and default to value in parameter
    pfTextBox -Field 10 -Label "Server Name" -Help "Enter Server name to return list of Services" -Text $ServerName
# Display execution button, so change of focus off text box is not required to show results
    pfButton -Field 20 -Text "Execute" -Space 10 -PSCall Verbose
}
<#
.SYNOPSIS
Optional method for validation and processing of ATPowerForm control events
#>
function pfEvent
{
Switch ($pfField)
{
20    {# Execute PowerShell script with output
                $ServerName = $pfFields[10].ToString();
# Assign Server Parameter
                if ($ServerName -ne "") {
$Result = get-service -ComputerName $ServerName | select-object Name,DisplayName,Status
} Else {
$Result = get-service | select-object Name,DisplayName,Status
}
$dat = $Result | pfToTable -TableName "Services"
pfGridView -Field 30 -BR 3 -DBListTable $dat -AllowSelecting False
}
}
}
#########################
# Main Execution and Exit
#########################
if ($pfCMD -ne "") {
#pfTrace -Style Parameter -Type Inbound;
    $pfSuccess = pfExecute; # ATPowerForm Execution function
    Return $pfReturnData;
}
#########################
# Execution Non-ATPowerForm
#########################
# Assign Server Parameter
if ($ServerName -ne "") {
get-service -ComputerName $ServerName | select-object Name,DisplayName,Status
} Else {
get-service | select-object Name,DisplayName,Status
}

Advanced Interactive Form with Multiple Pages

Can PowerShell be used for more than just an Administrative Tool?
Can an IT department standardize on a common development interface?
Can Powershell evolve beyond just a command line scripting tool?
Can Powershell be used to create Forms or Applications?

Well the answer to this is Yes, Yes, Yes, and
Yes.

More advanced scripts can be created that go beyond just a simple interactive experience. If necessary a complete Form and/or Application can be created using just PowerShell as the driver.


<#
.SYNOPSIS
    Tutorial - Services - Step 4
.DESCRIPTION
    The following script displays a list of services
.NOTES
    Script Name:        External_PS_Script_Demo.ps1
    Version:            1.0
      Author:           NuDigital Solutions
      Creation Date:    05/01/2014
#>
param(
    [string]$pfCMD = "",
    [int]$pfField,
    [hashtable]$pfFields = @{},
    [hashtable]$pfDetails = @{},
    [hashtable]$pfGlobals = @{},
    [string]$pfModPath = $Env:ATPowerForm,
    [string]$ServerName = ""
)

################################
# Load ATPowerForm Interfaces
$pfScriptPath = $MyInvocation.MyCommand.Path;
. $pfModPath\ATPowerForm.ps1;
################################

<#
.SYNOPSIS
    Optional method to create ATPowerForm control definitions for rendoring in the UI 
#>
function pfPaint
{
    # Group 1 - Display List of Serverices for Server
    # Display Text Box for Server input and default to value in parameter
    pfTextBox -Field 10 -Label "Server Name" -Help "Enter Server name to return list of Services" -Text $ServerName
    # Display execution button, so change of focus off text box is not required to show results
    pfButton -Field 20 -Text "Execute" -Space 10 -PSCall Verbose
    
    # Group 2 - Display individual Service fields for modigication
    pfGroup -Group 2 -Visible False
    pfTextBox -Field 50 -Group 2 -Label "Service Name" -Enabled False
    pfTextBox -Field 51 -Group 2 -Label "Description" -TextMode MultiLine -Rows 4 -Wrap True
    pfTextBox -Field 52 -Group 2 -Label "Display Name"
    $dat = @{"auto"="Automatic";"manual"="Manual";"disabled"="Disabled"};
    pfDropDownList -Field 53 -Group 2 -Label "Startup Type" -ListSelect False -DBListTable $(pfToTable -TableName "StartUpTypes" -Value $dat)
    pfLiteral -Field 54 -Group 2 -BR 1 -Label "Status" -RawHTML ""
    pfButton -Field 55 -Group 2 -BR 1 -Label "&nbsp;" -Text "Start" -PSCall Verbose
    pfButton -Field 56 -Group 2 -Space 2 -Text "Stop" -PSCall Verbose
    
    # Command Group 2 - Command for Group 2 - Service field modifications
    pfGroup -Group 2 -GroupType CmdGroup -Space 60 -Visible False
    pfButton -Field 60 -Group 2 -GroupType CmdGroup -Label "&nbsp;" -Text "Cancel" -ButtonType Custom -PSCall Verbose
    pfButton -Field 61 -Group 2 -GroupType CmdGroup -Text "Submit" -ButtonType Custom -Space 10 -PopUp PageBlocking -PSCall Verbose
}

<#
.SYNOPSIS
    Optional method for validation and processing of ATPowerForm control events 
#>
function pfEvent
{
    Switch ($pfField)
    {
        20    {# Execute PowerShell script with output
            $ServerName = $pfFields[10].ToString();
            # Assign Server Parameter
            if ($ServerName -ne "") {
                $Result = get-service -ComputerName $ServerName | select-object Name,DisplayName,Status
            } Else {
                $Result = get-service | select-object Name,DisplayName,Status
            }
            $dat = $Result | pfToTable -TableName "Services"
            pfGridView -Field 30 -BR 3  -AllowSelecting True -DBListTable $dat -PSCall Verbose
        } 
        30    {# Select Grid Row
            $ServiceName = $pfDetails[30]["Name"].ToString()
            $ServerName = $pfFields[10].ToString()
            
            # Assign Server Parameter
            if ($ServerName -ne "") {
                $Result = get-service -ComputerName $ServerName -Name $ServiceName
                $Result2 = get-wmiobject win32_service -ComputerName $ServerName | where-object {$_.Name -eq $ServiceName}
            } Else {
                $Result = get-service -Name $ServiceName
                $Result2 = get-wmiobject win32_service | where-object {$_.Name -eq $ServiceName}
            }
                            
            # Load Fields
            pfData -Field 50 -Value $ServiceName
            pfData -Field 51 -Value $Result2.Description
            pfData -Field 52 -Value $Result.DisplayName
            pfData -Field 53 -Value $Result2.StartMode.ToLower()
            pfData -Field 54 -Value $Result.Status
            if ($Result.Status -eq "Running") {
               pfButton -Field 55 -Enabled False
               pfButton -Field 56 -Enabled True
            } elseif ($Result.Status -eq "Stopped") {
               pfButton -Field 55 -Enabled True
               pfButton -Field 56 -Enabled False
            } Else {
               pfButton -Field 55 -Enabled False
               pfButton -Field 56 -Enabled False
            }
            pfGroup -Group 2 -Visible True
            pfGroup -Group 2 -GroupType CmdGroup -Visible True
            pfGroup -Group 1 -Visible False
        } 
            
        { @(55, 56) -contains $_ }    {# Start / Stop Service
            $ServiceName = $pfFields[50].ToString()
            $ServerName = $pfFields[10].ToString()

            # Assign Server Parameter
            if ($ServerName -ne "") {
                $Result = get-service -ComputerName $ServerName -Name $ServiceName
            } Else {
                $Result = get-service -Name $ServiceName
            }
            
            if ($pfField -eq 55) {
                Start-Service -InputObject $Result
            } Else {
                Stop-Service -InputObject $Result -Force
            }

            # Load Status
            pfData -Field 54 -Value $Result.Status
            if ($Result.Status -eq "Running") {
               pfButton -Field 55 -Enabled False
               pfButton -Field 56 -Enabled True
            } elseif ($Result.Status -eq "Stopped") {
               pfButton -Field 55 -Enabled True
               pfButton -Field 56 -Enabled False
            } Else {
               pfButton -Field 55 -Enabled False
               pfButton -Field 56 -Enabled False
            }
        } 

        61    {# Update Service
        `    # Validate Display Name contains a value
               if ($pfFields[52] -eq "") {
                   pfStatus -Field 52 -ErrFlag True -ErrMsg "Display Name Required" -ErrType Fatal
                break;
               }
            # Update Service data
            $ServiceName = $pfFields[50].ToString()
            $ServerName = $pfFields[10].ToString()
            # Update Startup Type
            if ($pfFields[53] -eq "Auto") {$StartType = "Automatic"} Else {$StartType = $pfFields[53]}
            # Execute update
            if ($ServerName -ne "") {
                $Result = set-service -ComputerName $ServerName -Name $ServiceName  -Description $pfFields[51] -DisplayName $pfFields[52] -StartupType $StartType
            } Else {
                $Result = set-service -Name $ServiceName -Description $pfFields[51] -DisplayName $pfFields[52] -StartupType $StartType
            }
            
            # Switch Page Groups
            pfGroup -Group 2 -Visible False
            pfGroup -Group 2 -GroupType CmdGroup -Visible False
            pfGroup -Group 1 -Visible True
            
            # Reload Grid (if Status Changed)
            $ServerName = $pfFields[10].ToString()
            # Assign Server Parameter
            if ($ServerName -ne "") {
                $Result = get-service -ComputerName $ServerName | select-object Name,DisplayName,Status
            } Else {
                $Result = get-service | select-object Name,DisplayName,Status
            }
            $dat = $Result | pfToTable -TableName "Services"
            pfGridView -Field 30 -BR 3  -AllowSelecting True -DBListTable $dat -PSCall Verbose
        } 
        60    {# Cancel Service
            # Switch Page Groups
            pfGroup -Group 2 -Visible False
            pfGroup -Group 2 -GroupType CmdGroup -Visible False
            pfGroup -Group 1 -Visible True
            
            # Reload Grid (if Status Changed)
            $ServerName = $pfFields[10].ToString()
            # Assign Server Parameter
            if ($ServerName -ne "") {
                $Result = get-service -ComputerName $ServerName | select-object Name,DisplayName,Status
            } Else {
                $Result = get-service | select-object Name,DisplayName,Status
            }
            $dat = $Result | pfToTable -TableName "Services"
            pfGridView -Field 30 -BR 3  -AllowSelecting True -DBListTable $dat -PSCall Verbose
        } 
    }
}

#########################
# Main Execution and Exit
#########################
if ($pfCMD -ne "") {
    #pfTrace -Style Parameter -Type Inbound;
    $pfSuccess = pfExecute; # ATPowerForm Execution function
    Return $pfReturnData;
}

Robust Selection of Controls

Script writers have a full assortment of ASP.NET control to choose from, including a few non-displayable controls like Hidden and Timer. 

<#
.SYNOPSIS
    Control Inventory script to ATPowerForm 
.DESCRIPTION
    This sample scripts shows an inventory of control available in ATPowerForm
.NOTES
    Script Name:    Control_Inventory.ps1
    Version:        1.0
    Author:         Nudigital Solutions
    Creation Date:  05/01/2014
    Purpose/Change: Initial script development
#>
param(
    [string]$pfCMD = "",
    [int]$pfField,
    [hashtable]$pfFields = @{},
    [hashtable]$pfDetails = @{},
    [hashtable]$pfGlobals = @{},
    [string]$pfModPath = $Env:ATPowerForm
)

################################
# Load ATPowerForm Interfaces
$pfScriptPath = $MyInvocation.MyCommand.Path;
. $pfModPath\ATPowerForm.ps1;
################################

<#
.SYNOPSIS
    Optional method to create ATPowerForm control definitions for rendoring in the UI 
#>
function pfPaint
{
    pfliteral -Field 2 -RawHTML '<table style="width: 100%"><tr><td colspan="4" style="text-align: center; font-weight: 700; font-size: x-large; font-family: Arial, Helvetica, sans-serif; background-color: #C0C0C0"><br />Literal<br /><br /></td></tr><tr><td style="width: 115px">';
    pfImage -Field 4 -Label "Image" -ImageUrl ".\images\Logo_mi.png";
    pfTextbox -Field 6 -Label "Textbox";
    pfButton -Field 8 -Label "Button" -Text "Push";
    pfHyperLink -Field 10 -Label "Hyperlink" -Target _blank -Text "Link" -NavUrl "http://";
    pfCheckBox -Field 12 -Label "Checkbox" -Text "Check";
    pfRadioButton -Field 14 -Label "RadioButton" -Text "Radio1" -GroupName "g1";
    pfRadioButton -Field 16 -Text "Radio1" -Space 4 -GroupName "g1";
    
    $dat = @{1="Value 1";2="Value 2";3="Value 3"};
    pfDropDownList -Field 18 -Label "DropDownList" -ListSelect True -DBListTable $(pfToTable -TableName "cbo" -Value $dat);
    pfListBox -Field 20 -Label "ListBox" -DBListTable $(pfToTable -TableName "cbo" -Value $dat);
    pfGridView -Field 22 -BR 2 -PageSize 10 -DBListTable  $(pfToTable -TableName "cbo" -Value $dat) -SelectText "Grid select";
}

#########################
# Main Execution and Exit
#########################
if ($pfCMD -ne "") {
    #pfTrace -Type Both -Style Parameter;
    $pfSuccess = pfExecute; # ATPowerForm Execution function
    Return $pfReturnData;
}

Much... Much.. More...

Ajax Enabled
  • Any control can either be rendered as Ajax or Non-Ajax.
  • Designer has control over either a full page or individual Field block.
Data Binding (for database integration)
  • One-way binding for data loading only.
  • Almost all controls contain a data binding property.
  • Supports Queries, Views, and Stored Procedures.
  • Multiple fields can be loaded from a single query (for data entry forms).
Confirmation Popup Modal Dialog
  • A property on all button controls.
  • Popup PowerShell function to display popup at any time.
  • Supports any negative or positive confirmation.
Script Writing Assistance
  • All ATPowerForm commands have context sensitive help.
  • Most ATPowerForm command have selectable enumerated values.
  • Debug log and propagated error messages.
  • A library of sample PowerShell scripts.

...

123movies