Menu

Connect-SasWorkspaceServer

Andreas Menrath
Synopsis
    Connect to a remote SAS server

Syntax
    Connect-SasWorkspaceServer [-Uri] <String> [<CommonParameters>]

    Connect-SasWorkspaceServer [-Uri] <String> [-Credential] <PSObject> [<CommonParameters>]

    Connect-SasWorkspaceServer [-Uri] <String> [-User] <String> [-Password] <PSObject> [<CommonParameters>]

Description

Parameters
    -Uri <String>
        Uri string containing the server definition.
        For more information see SAS documentation: http://support.sas.com/documentation/cdl/en/oledbpr/63701/HTML/default/viewer.htm#p016vf6x8ord2nn1pm0dg3fjsuo1.htm

        Required?                    true
        Position?                    0
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -Credential <PSObject>
        One of two types of supported credentials object:
        1) PsCredential object.
        Create object from interactive prompt with the Get-Credential Cmdlet
        2) SASObjectManager.LoginDef object.
        The SAS API may provide you a LoginDef object or you can create new LoginDef COM objects with the New-Object Cmdlet.

        Required?                    true
        Position?                    1
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -User <String>
        Username

        Required?                    true
        Position?                    1
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -Password <PSObject>
        Password as plain text
        or as a SecureString object

        Required?                    true
        Position?                    2
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

Inputs

Outputs

Notes

Examples
    --------------  Example 1  --------------
    PS C:\> # remote server with IWA
    $ws = Connect-SasWorkspaceServer "iom://mycompany.com:8591;Bridge;SECURITYPACKAGE=Negotiate"

    Creates a workspace session on a remote server using Integrated Windows Authentication (IWA)
    --------------  Example 2  --------------
    PS C:\> # remote server with username and password
    $ws = Connect-SasWorkspaceServer "iom://mycompany.com:8591;Bridge" "MyUser" "MyPassword"

    Creates a workspace session on a remote server using explicit username and password
    --------------  Example 3  --------------
    PS C:\> # remote server with username and password
    $User = Read-Host -Prompt 'Enter User'
    $SecurePassword = Read-Host -Prompt 'Enter password' -AsSecureString
    $ws = Connect-SasWorkspaceServer "iom://mycompany.com:8591;Bridge" $User $Password

    Creates a workspace session on a remote server using username and secured password
    --------------  Example 4  --------------
    PS C:\> # remote server with credentials
    $myCreds = Get-Credential
    $ws = Connect-SasWorkspaceServer "iom://mycompany.com:8591;Bridge" $myCreds

    Creates a workspace session on a remote server using credentials from prompt
    --------------  Example 5  --------------
    PS C:\> # remote server with credentials
    $objLogin = New-Object -ComObject SASObjectManager.LoginDef;
    $objLogin.LoginName = "MyUser";
    $objLogin.Password = "MyPass";

    $ws = Connect-SasWorkspaceServer "iom://mycompany.com:8591;Bridge" $objLogin

Creates a workspace session on a remote server using credentials from LoginDef object

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.