Automatically create ODBC DSN connection with powershell or GPO

Hi,
I'm trying to create a ODBC connection that has a special network port and also password automatically stored.
I have tried to do this with the add-odbcdsn cmdlet and adding attributes to a group policy object configuration without luck.
If I try to export settings with regedit and import them trough logonscript, the normal users dont have user rights to the LOCAL Machine hive.
Therefore I have tried to export a USER DSN instead, but either of the port or password settings are exported.
Please help.

Hello,
You can create a VB Script (.vbs) as the one create by Clamp77 on the following thread.
http://stackoverflow.com/questions/23552529/can-i-create-a-bat-file-to-automate-data-sources-adding-in-odbc-data-source-adm
Then you can run the script on computers using GPOs as explained on the following article.
http://technet.microsoft.com/en-us/library/dn789196.aspx
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com

Similar Messages

  • Automatically create ODBC DSN connection with special port and password. Add-OdbcDsn cmdlet

    Hi,
    I first posted a question in the SQL forum but I'm posting it here instead because its a Powershell question.
    In a non-persitent VDI enviroment we are trying to automatically create a ODBC DSN connection to a SQL server.
    We are using Windows 8.1 so we also have Powershell 4 together with the add-odbcdsn cmdlet. 
    But when trying to add set -SetPropertyValue for network port different than default and a password we get an error.
    here is the command:
    Add-OdbcDsn -Name test -DriverName "SQL Server" -DsnType User -SetPropertyValue @("PWD=test", "SERVER=10.0.0.1")
    and here is the error message:
    Add-OdbcDsn : Attempt to set the {UID or PWD} key of a DSN. These keys should not be stored in the registry for securit
    y reason. Provide the credential information at runtime via SQLDriverConnect, SQLConnect or SQLBrowseConnect.
    At line:1 char:1
    + Add-OdbcDsn -Name test -DriverName "SQL Server" -DsnType User -SetPropertyValue @ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (MSFT_OdbcDsnTask:Root/Microsoft/...SFT_OdbcDsnTask) [Add-OdbcDsn], Cim
    Exception
    + FullyQualifiedErrorId : MI RESULT 4,Add-OdbcDsn
    NB!:  this command does not contain a port number, but when adding it without a password(PWD string) we just the default port.

    Hi Primeid,
    Agree with Jrv, we cannot store  UID and PWD in an ODBC datasource, For example, you can create a DSN using the user interface but if you look at the DSN stored in the registry the UID and PWD are not stored.
    ODBC it is always required when you connect using a DSN that the caller supply UID and PWD if they want to use standard login during connection time. 
    These similar discussion are for your reference:
    Creating ODBC DSN for SQL Native
    Client fails for not-integrated authentication
    is user name and password required in ODBC admin / User DSN?
    In addition, to read data from a SQL Server database using an ODBC DSN with SQL Authentication via powershell, please refer to this script:
    Open SQL database with ODBC DSN and SQL AuthenticationIf
    there is anything else regarding this issue, please feel free to post back.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to create odbc (dsn) connection for OBIEE AND INFOR in unix environment

    Hi,
    we are establishing OBIA in Unix environment we set all the things fine but we are getting problem how to create ODBC connection
    for INFORMATICA AND OBIEE. I searched some blogs thats telling there is a ODBC.INI file we need to configure.
    but i am not getting clear idea to give parameters and it will not showing any TNSNAME ..........etc
    please any body give clear idea about how to create ODBC connection and LOCATION of that file AND parameter which i need to give.
    Thanks,
    charan....

    Hi Dpka,
    yah i already checked that one but i have not find out any parameter for TNS NAME information.
    is OBIEE connected to ORACLE DATA BASE without giving TNS information?............in UNIX OPERATING SYSTEM.
    pls give me the clear idea abt how to connect OBIEE, INFORMATICA to ORACLE DATA BASE IN UNIX ENVRNMENT
    thanks,
    charan.

  • Issue with creating oracle ODBC DSN connection

    Hi all,
    We have BO X! 3.1. We have created some webi reports. Our universe connection is created using following method.
    = Created a DSN connection for oracle 10g database
    = created Bo connection object by selecting Generic ODBC connection
    = in the service name we have given DSN name and tested successfully.
    we have created reports universe under Windows environment.
    = Now we deployed Biar file of the same on SOLARIS server.
    We have created odbc connection in odbc.ini  on solaris.
    we have used path "/../boxir3/bobje/odbc.ini"
    We have used "/BOXIR3/bobje/enterprise120/solaris_sparc/odbc/lib/libsqora.so.10.1" driver
    But when we test connection after deployment connection fails. giving error
    " A database error occured. The database error text is:. (WIS 10901)"
    Can anybody suggest me right method to create ODBC connection for oracle 10g on SOLARIS.
    Thanks in advance.
    Saurabh

    Hi Saurabh,
    You said your odb.ini is at the location "/../boxir3/bobje/odbc.ini". Verify if environment variable ODBCINI is pointing to this location. For this do a echo $ODBCINI. This should return the path of your odbc.ini file. If this command returns empty, that means this variable is not set. In this case you will have to set your ODBCINI using the below command.
    If you are using bash shell
    export ODBCINI=/../boxir3/bobje/odbc.ini.
    if this does not work try
    set ODBCINI=/../boxir3/bobje/odbc.ini
    Thanks
    -Anup-

  • Creating a TCP connection with SSL/TLS

    Hi,
    I am working in a application that depends on the server. I need to estabilish a TCP connection with SSL/Tls secure connection with the server in order to get the datas.
    I have the following code structure :
    - (id)initWithHostAddressNSString*)_host andPortint)_port
    [self clean];
    self.host = _host;
    self.port = _port;
    CFWriteStreamRef writeStream;
    CFReadStreamRef readStream;
    return self;
    -(BOOL)connect
    if ( self.host != nil )
    // Bind read/write streams to a new socket
    CFStreamCreatePairWithSocketToHost(kCFAllocatorDef ault, (CFStringRef)self.host, self.port, &readStream, &writeStream);
    return [self setupSocketStreams];
    - (BOOL)setupSocketStreams
    // Make sure streams were created correctly
    if ( readStream == nil || writeStream == nil )
    [self close];
    return NO;
    // Create buffers ---- has not been released , so need to check possible ways to release in future
    incomingDataBuffer = [[NSMutableData alloc] init];
    outgoingDataBuffer = [[NSMutableData alloc] init];
    // Indicate that we want socket to be closed whenever streams are closed
    CFReadStreamSetProperty(readStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
    CFWriteStreamSetProperty(writeStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
    //Indicate that the connection needs to be done in secure manner
    CFReadStreamSetProperty(readStream, kCFStreamPropertySocketSecurityLevel, kCFStreamSocketSecurityLevelNegotiatedSSL);
    CFWriteStreamSetProperty(writeStream, kCFStreamPropertySocketSecurityLevel, kCFStreamSocketSecurityLevelNegotiatedSSL);
    // We will be handling the following stream events
    CFOptionFlags registeredEvents = kCFStreamEventOpenCompleted |
    kCFStreamEventHasBytesAvailable | kCFStreamEventCanAcceptBytes |
    kCFStreamEventEndEncountered | kCFStreamEventErrorOccurred;
    // Setup stream context - reference to 'self' will be passed to stream event handling callbacks
    CFStreamClientContext ctx = {0, self, NULL, NULL, NULL};
    // Specify callbacks that will be handling stream events
    BOOL doSupportAsync = CFReadStreamSetClient(readStream, registeredEvents, readStreamEventHandler, &ctx);
    BOOL doSupportAsync1 = CFWriteStreamSetClient(writeStream, registeredEvents, writeStreamEventHandler, &ctx);
    NSLog(@"does supported in Asynchrnous format? : %d :%d", doSupportAsync, doSupportAsync1);
    // Schedule streams with current run loop
    CFReadStreamScheduleWithRunLoop(readStream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
    CFWriteStreamScheduleWithRunLoop(writeStream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
    // Open both streams
    if ( ! CFReadStreamOpen(readStream) || ! CFWriteStreamOpen(writeStream))
    // close the connection
    return NO;
    return YES;
    // call back method for reading
    void readStreamEventHandler(CFReadStreamRef stream,CFStreamEventType eventType, void *info)
    Connection* connection = (Connection*)info;
    [connection readStreamHandleEvent:eventType];
    // call back method for writing
    void writeStreamEventHandler(CFWriteStreamRef stream, CFStreamEventType eventType, void *info)
    Connection* connection = (Connection*)info;
    [connection writeStreamHandleEvent:eventType];
    `
    As above, I have used
    CFReadStreamSetProperty(readStream, kCFStreamPropertySocketSecurityLevel, kCFStreamSocketSecurityLevelSSLv3);
    CFWriteStreamSetProperty(writeStream, kCFStreamPropertySocketSecurityLevel, kCFStreamSocketSecurityLevelSSLv3);
    in order to make a secured connection using sockets.
    The url i am using is in the format "ssl://some domain.com"
    But in my call back method i am always getting only kCFStreamEventErrorOccurred for CFStreamEventType .
    I also tried with the url "https://some domain.com" ,but getting the same error.
    i also commented out setting kCFStreamPropertySocketSecurityLevel, but still i am receiving the same error that i mentioned above.
    I dont know how it returns the same error. I have followed the api's and docs , but they mentioned the same way of creating a connection as i had given above.
    I tried to get the error using the following code :
    CFStreamError error = CFWriteStreamGetError(writeStream);
    CFStreamErrorDomain errDomain = error.domain;
    SInt32 errCode = error.error;
    The value for errCode is 61 and errDomain is kCFStreamErrorDomainPOSIX. so i checked out the "errno.h", it specifies errCode as "Connection refused"
    I need a help to fix this issue.
    If the above code is not the right one,
    **(i)how to create a TCP connection with SSL/TLS with the server.**
    **(ii)How the url format should be(i.e its "ssl://" or "https://").**
    **(iii)If my above code is correct where lies the error.**
    I hope the server is working properly. Because I can able to communicate with the server and get the datas properly using BlackBerry and android phones. They have used SecuredConnection api's built in java. Their url format is "ssl://" and also using the same port number that i have used in my code.
    Any help would be greatly appreciated.
    Regards,
    Mohammed Sadiq.

    Hello Naxito. Welcome to the Apple Discussions!
    Try the following ...
    Perform a "factory default" reset of the AX
    o (ref: http://docs.info.apple.com/article.html?artnum=108044)
    Setup the AX
    Connect to the AX's wireless network, and then, using the AirPort Admin Utility, try these settings:
    AirPort tab
    o Base Station Name: <whatever you wish or use the default>
    o AirPort Network Name: <whatever you wish or use the default>
    o Create a closed network (unchecked)
    o Wireless Security: Not enabled
    o Channel: Automatic
    o Mode: 802.11b/g Compatible
    Internet tab
    o Connect Using: Ethernet
    o Configure: Manually
    o IP address: <Enter your college-provided IP address>
    o Subnet mask: <Enter your college-provided subnet mask IP address>
    o Router address: <Enter your college-provided router IP address>
    o DNS servers: <Enter your college-provided DNS server(s)
    o WAN Ethernet Port: Automatic
    <b>Network tab
    o Distribute IP addresses (checked)
    o Share a single IP address (using DHCP & NAT) (enabled)

  • How to manage a connection with powershell using visual studio with C#

    Hi
     I want to manage a connection with powershell for a web app using visual studio with c#. and also run command with pipeline 
    Plz give a some suggestions..

    Hi Raj_Kumar_Saini,
    To make things clear, could you please clarify these thing?
    1. Do you mean you want to execute some PowerShell scripts from C# language? These blogposts may give you  some ideas:
    Executing PowerShell scripts from C#
    Powershell Automation and Remoting (a c# love story)
    Execute PowerShell from a ASP.NET Web Application
    2. Is your question related to Visual Studio Integration? Do you want to build a Visual Studio Extension?
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • DSN Connection with Go Daddy Account

    Can anyone help me with creating a DSN in Dreamweaver for a Go Daddy Account? The DSN is already created on Go Daddy, which is named access_DataSource.dsn and is located in a folder called _dsn.
    I also have an Access DB named DataSource.mdb located in a folder called access_db. These 2 locations are required by Go Daddy.
    I have always created DSN before with other hosting companies, but Go Daddy is different I guess...
    Here's my connection.asp page:
    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    Dim MM_ESDCheckDatasource_STRING
    MM_ESDCheckDatasource_STRING = "dsn=access_DataSource;"
    %>
    It used to work with a different hosting company, but now I'm not sure what to do different here...
    Thank you!

    I've always used Web.com for my hosting provider. They let me choose my DSN name and select a database, which makes it easy. But Go Daddy, as soon as you upload your Access DB to they server, they create the DSN for you.
    When I go in Dreamweaver to create my Database > Data Source Name (DSN), I select the option to Use DSN on testing server. When I click on the "DSN" button, it doesn't find anything...
    I read some other posts online and looks like Go Daddy uses an unusual way of creating DSN...

  • Creating ODBC DSN for SQL Server in LINUX

    Hi All,
    I am getting probelms in creating DSN for SQL server. I have created an entry in odbc.ini file under ODBC sources and provided the SQL server detiails as follows
    [ODBC Data Sources]
    AnalyticsWeb=Oracle BI Server
    Cluster=Oracle BI Server
    SSL_Sample=Oracle BI Server
    SQL_DB=DataDirect 5.1 SQL Server Wire Protocol
    [SQL_DB]
    Driver=/u01/OracleBI/odbc/lib/SEmsss23.so
    Description=DataDirect 5.1 SQL Server Wire Protocol
    Address=172:16:1:169, 1433;
    AlternateServers=
    AnsiNPW=Yes
    ConnectionRetryCount=0
    ConnectionRetryDelay=3
    Database=actdb/act7
    LoadBalancing=0
    LogonID=oracle
    Password=tiger
    QuoteID=No
    ReportCodePageConversionErrors=0
    When I test the connection ,i am getting the following error
    +[nQSError: 16023] The ODBC function has returned an error. The database may not be available, or the network may be down.+
    Can you please help in fixing this issue.I am not sure of the Drivers and the descrition that I am using are correct or not.
    Please let me know the process of creating the DSN for SQL server in LINUX and also how can we check the available drivers in LINUX?
    Thank You in advance,
    S1r1

    OBIEE does all of its data retrieval from the server. Your server needs to be able to query all of the data sources that you define.
    The client is irrelevant here, it's just a web browser consuming data that the BI Server returns to it.
    So yes you need to define connectivity from your Linux server to your SQL Server box.
    The Systems Requirements doc (http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e10417.pdf) details DataDirect ODBC drivers that are provided for non-Widows connectivity to SQL Server

  • How to create a data connection with dynamic XML file?

    Thanks for all reply first!
    I have formatted the submitted data into an XML file on the server side,this file can be import to PDF form correctly.
    I try to send this XML file to the user to let him can review what he has submitted.
    I guess that I should create a data connection to the XML file so that it can be reviewed by the user.
    But the question is that the XML file is dynamic generated.
    How can i do?
    give me some clus or examples,please.
    thanks,
    Jasper.

    Hi Jasper,
    To show user back the result, you can use PDF instead of XML. You can store the PDF template in server and you can merge XML data with PDF template by Livecycle Form Data Integration service.
    We, as KGC, can generate huge number of Adobe Livecycle forms in small periods. Also we give consultancy on Adobe Livecycle ES products and Adobe Livecyle Designer. In case of any need, do not hesitate to contact us.
    Asiye Günaydın
    Project Consultant
    KGC Consulting Co.
    www.kgc.com.tr

  • How to create an azure website with PowerShell?

    Hello
    I'm, trying to create a new wordpress website in Azure with PowerShell, I saw a video: https://www.youtube.com/watch?v=LHjkn59Lf0g
    But, When execute my code, I get the following error:
    New-AzureResourceGroup :
    06:42:41 p. m. - Resource SuccessBricks.ClearDB/databases 'dbdb3' failed with message 'User
    failed validation to purchase resources. Error message: '["Credit Card is the only supported payment instrument for
    purchases"]''
    What Can I do?
    I have a bizspark subscription with enough money :S
    THANKS!

    Hi Victor,
    Thanks for your question.
    Firstly, I recommend you to create the website and recourse group in Azure portal to see if the issue persists.
    In addition, I will have a test for this and feedback to you later. Appreciate your patience.
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Create a Loolup field with PowerShell but Change the Default Display field

    Hi 
    I am creating the a load of site columns with PowerShell. In the case of a Lookup Column I want to ensure that a the the industry column is checked programmatically.
    $myField.LookupList = $spLookupList.ID
    $myField.LookupField = $LookUpmyField.InternalName
    As you can see there is no provision for a display name (Industry) which I want to display to the user once they select a lookup column
    I just know somebody is going to suggest CAML !!!!  Btw the code works but none of the checkboxes are selected as expected. 
    Daniel
    Freelance consultant

    I tried a same in past. Couldn't find a perfect code. You can try below:
    http://blogs.msdn.com/b/varun_malhotra/archive/2008/06/19/how-to-set-the-default-value-for-a-look-up-field-for-an-item-as-it-is-being-created.aspx
    <Code>
    SPList docs = w.Lists["Documents"];
    SPFieldLookup fl = (SPFieldLookup)docs.Fields["City"];
    fl.DefaultValue = "1;#Mexico City";
    fl.Update();
    </Code>
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/afd71aa8-54d3-424f-9b72-67328e080048/update-lookup-field-powershell?forum=sharepointdevelopmentprevious
    $w = Get-SPWeb http://web
    $l = $w.Lists["MyDocumentLibrary"]
    $lf = $l.Fields["lookupColumn"]
    $i = $l.Items[0] #List item to update
    $lf.ParseAndSetValue($i,"1;#lookupvalue") #1;#lookupvalue refers to the ID of the lookup item and the value of the lookup item.
    $i.Update()
    If this helped you resolve your issue, please mark it Answered

  • How to create a mount point with PowerShell

    Hello,
    Can you please point me to a sample which creates a mount point using powershell?

    Try this. I cooked it up by consolidating a few different sources.  I posted it on the microsoft connect suggestion for native support, under workarounds:
    https://connect.microsoft.com/PowerShell/feedback/details/627099/need-powershell-equivalent-to-cmds-mklink
    #symlinks.ps1
    # First add a type so it stays available for this instance
    Add-Type -TypeDefinition @'
    using System;
    using System.Runtime.InteropServices;
    namespace mklink
    public class symlink
    [DllImport("kernel32.dll")]
    public static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int dwFlags);
    [DllImport("kernel32.dll")]
    public static extern bool RemoveDirectory(string lpPathName);
    [DllImport("kernel32.dll")]
    public static extern uint GetLastError();
    Function New-ReparsePoint() {
    <#
    .SYNOPSIS
    Creates a reparse point to the specified target.
    .DESCRIPTION
    Creates a reparse point to the specified target.
    .PARAMETER Path
    Path to the reparse point to remove.
    .NOTES
    Author: Jordan Mills
    Version: 1.0
    .EXAMPLE
    Remove-SymbolicLink -Path "E:\directory\mount"
    #>
    [cmdletbinding(DefaultParameterSetName="default")]
    Param (
    [parameter(
    ParameterSetName="default",
    Position=0,
    Mandatory=$true,
    ValueFromPipeLine=$True,
    ValueFromPipelineByPropertyName=$True
    [parameter(
    ParameterSetName="file",
    Position=0,
    Mandatory=$true,
    ValueFromPipeLine=$True,
    ValueFromPipelineByPropertyName=$True
    [parameter(
    ParameterSetName="directory",
    Position=0,
    Mandatory=$true,
    ValueFromPipeLine=$True,
    ValueFromPipelineByPropertyName=$True
    [Alias("Path","FileName","Directory")]
    [string[]]$Name,
    [parameter(
    ParameterSetName="default",
    Position=1,
    Mandatory=$true,
    ValueFromPipelineByPropertyName=$True
    [parameter(
    ParameterSetName="file",
    Position=1,
    Mandatory=$true,
    ValueFromPipelineByPropertyName=$True
    [parameter(
    ParameterSetName="directory",
    Position=1,
    Mandatory=$true,
    ValueFromPipelineByPropertyName=$True
    [string]$TargetPath,
    [parameter(
    ParameterSetName="file",
    Position=2,
    Mandatory=$false,
    ValueFromPipelineByPropertyName=$True
    [switch]$IsFile,
    [parameter(
    ParameterSetName="directory",
    Position=2,
    Mandatory=$false,
    ValueFromPipelineByPropertyName=$True
    [switch]$IsDirectory
    If ($IsFile -or $IsDirectory) {
    If($IsFile) {
    $result = [mklink.symlink]::CreateSymbolicLink($Name,$TargetPath,0)
    Else {
    If($IsDirectory) {
    $result = [mklink.symlink]::CreateSymbolicLink($Name,$TargetPath,1)
    Else {
    Write-Error -Message "Conflicting path type parameters. This should not happen."
    Break;
    Else {
    If (Test-Path -LiteralPath $TargetPath -PathType Leaf -ErrorAction SilentlyContinue) {
    $result = [mklink.symlink]::CreateSymbolicLink($Name,$TargetPath,0)
    Else {
    If (Test-Path -LiteralPath $TargetPath -PathType Container -ErrorAction SilentlyContinue) {
    $result = [mklink.symlink]::CreateSymbolicLink($Name,$TargetPath,1)
    Else {
    Write-Error -Message "Unable to determine path type of TargetPath. Use -IsFile or -IsDirectory."
    Break;
    If ($result) {
    Get-Item $Name
    } Else {
    Write-Error -Message "Error creating symbolic link" -Category WriteError #-ErrorId $([mklink.symlink]::GetLastError())
    Function Remove-ReparsePoint {
    <#
    .SYNOPSIS
    Removes a file or directory that is a reparse point (symlink or hardlink) without removing all child objects.
    .DESCRIPTION
    Removes a file or directory that is a reparse point (symlink or hardlink) without removing all child objects.
    .PARAMETER Path
    Path to the reparse point to remove.
    .NOTES
    Author: Jordan Mills
    Version: 1.0
    .EXAMPLE
    Remove-SymbolicLink -Path "E:\directory\mount"
    #>
    [cmdletbinding()]
    Param (
    [parameter(
    Position=0,
    Mandatory=$true,
    ValueFromPipeLine=$True,
    ValueFromPipelineByPropertyName=$True
    [Alias("FullName","Name","FileName","Directory")]
    [ValidateScript({Test-Path $_})]
    [string[]]$Path
    $Path |
    Get-Item |
    ForEach-Object {
    $Item = $_;
    Switch ($Item.Attributes -band ([IO.FileAttributes]::ReparsePoint -bor [IO.FileAttributes]::Directory)) {
    ([IO.FileAttributes]::ReparsePoint -bor [IO.FileAttributes]::Directory) {
    # Is reparse directory / symlink
    If ($whatif) {
    Write-Host "What if: Performing the operation `"Delete Directory`" on target `"$($_.FullName)`""
    } Else {
    [System.IO.Directory]::Delete($Item.FullName);
    Break;
    ([IO.FileAttributes]::ReparsePoint -bor 0) {
    # Is reparse file / hardlink
    If ($whatif) {
    Write-Host "What if: Performing the operation `"Delete File`" on target `"$($_.FullName)`""
    } Else {
    [System.IO.File]::Delete($Item.FullName);
    Break;
    default {
    Write-Error "$Item is not a reparse point."

  • Enable Remote Desktop Connections with PowerShell

    What is the easiest way to enable remote desktop connections on Windows 7, with powershell?

    Use Shay Levy's "Remote Registry PowerShell Module", and modify the value of the "fDenyTSConnection" value in the
    key "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" on the remote box to "0"
    The Windows 7 box will need to be rebooted before it will take effect.
    See http://oreilly.com/windows/archive/server-hacks-remote-desktop.html
    Or, grab Michal Gajda's script "Enable-RDP.ps1" in the gallery :)
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    My Blog: http://unlockpowershell.wordpress.com
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})

  • ODBC DSN Connection

    Hi All,
       I have a report that needs to connect to a local( to the server) DSN Connection on the Crystal Server 2008 and am having difficulty viewing the report. I am getting connection errors. My question is: How do I configure the report under "Database Configuration" to get it to connect to the DSN Connection on the server?
    Thank you in advance.

    Create the same DSN or the datasource name as on the server and update in Crystal reports using set datasource location. What database is it pointing to?
    Thanks!

  • Is it possible create a new connection with oracle database in javascript or formcalc?

    I need create a new connection, but it is necessary that I connect when the user click in a button.
    Is it possible?
    How can I do?
    Thanks
    Rubén

    How to connect ORACLE database to ADOBE LIFE CYCLE READER EXTENSION or ADOBE LIFE CYCLE DESIGNER

Maybe you are looking for