Use powershell to read Environment tab checkbox from ADUC

Hello all,
In ADUC, when you pull up a user, you can see an "Environment" tab, which contains a checkbox for "Start the following program at logon:". Here's a picture:
What I would like to do is use PowerShell to see if this checkbox is checked for a user. In my Google searches however, I have found that this checkbox is contained in the infamous "UserParameters" attribute.
My question is, what is the best way to see if this checkbox is checked for a user using PowerShell? Is this checkbox contained in any other attribute that PowerShell can read, or will I need to parse the UserParameters attribute to see if it's checked?

Hi Kent,
As a workaround, the script below can help you to get the option "Program file name" and "Start in", if the option "Start the following program at logon" hasn't been checked, the script below will occur error "the property
can't be found":
$user = [adsi]"LDAP://CN=username,CN=Users,DC=domain,DC=domain,DC=com"
$user.PSBase.Invokeget("TerminalServicesInitialProgram")
$user.PSBase.Invokeget("TerminalServicesWorkDirectory")
If there is anything else regarding this script, please feel free to post back.
Best Regards,
Anna Wang

Similar Messages

  • Use Powershell to read contents on email message pipe to variable

    Hey guys,
           Got a new one for ya'll. I've been tasked with writing a powershell app that will watch an Exchange inbox and if the body of the email contains MSDS=xxxxxxxx.pdf email the xxxxxxx.pdf file to a external customer.
    The email portion i know how to do no problem. I'm stumped on reading the body of the email and returning the variable xxxxx.pdf to pipe out that variable to my email function.
    Tried doing some googling on this without much luck. Anyone done this before or have a tutorial/resource to point me in the right direction ?
    Thanks
    Rich
    Rich Thompson

    Here's what i've come up with just googling around throwing something quick and dirty together. I'm sure im way off on this but it's helping me visually get the idea of what i need. This is an Exchange server so i dont even know if MAPI is enabled server
    side or not. Will figure that one out later on.
    $olFolderInbox = 6
    $outlook = new-object -com outlook.application;
    $ns = $outlook.GetNameSpace("MAPI");
    $inbox = $ns.GetDefaultFolder($olFolderInbox)
    $inbox.items | foreach
    if ($_.body -match "MSDS=")
    $filename = ALL CHARACTERS AFTER "=" UP UNTIL .PDF IF MULTIPLE .PDF FILES ATTACH ALL OF THEM IN THE NEW EMAIL
    Send-MailMessage -SmtpServer smtp-mail.xxxxxxxx.com -To $sender -From [email protected] -Subject "MSDS(s) Requested from TESTING, Inc." -Attachments
    Rich Thompson
    You cannot run Outlook on the Exchange server.  It can only be run from a non-Exchange client with Outlook installed.
    ¯\_(ツ)_/¯

  • Using Powershell to read XML

    I have a weird XML doc where the data is contained in the node in placed.
    An example. 
    <computers><computerData ip-Dir="127.0.0.1" name ="eth01"/></computers>
    What I want to do is get the IP address so I can edit it later. Here is the code I am using. 
    $path = C:\temp\temp.xml
    $xdoc = New-Object -TypeName XML
    $xdoc.Load($path)
    [xml]XMLConfig = Get-Content -path $path
    $xdoc."computers"."computerData" | Select-Object -Property "ip-Dir"
    This doesn't work though. Just gives me "ip-dir : "
    Any thoughts?

    You can also do this but it may fail on complex documents:
    PS C:\scripts> $xml.computers.computerData
    ip-Dir name
    127.0.0.1 eth01
    127.0.0.2 eth02
    127.0.0.3 eth03
    127.0.0.4 eth01
    PS C:\scripts> $xml.computers.computerData.Name
    eth01
    eth02
    eth03
    eth01
    PS C:\scripts> $xml.computers.computerData[2]
    ip-Dir name
    127.0.0.3 eth03
    PS C:\scripts> $xml.computers.computerData[2].'ip-Dir'
    127.0.0.3
    You may also have to add namespace support.
    ¯\_(ツ)_/¯

  • Using Powershell to update AD Users staring from a CSV

    Hi!
    i need to update a list of AD Users and change for all of them the same attribute with the same value.
    i have a csv containing just the list of users cn, ho can i make the query on this attribute?
    I start to build the command and i've something like that:
    $USERS = Import-CSV C:\Users\Users2.csv
    $USERS | Foreach{Get-ADUser
    -filter {cn -eq $_.name} |
    Set-ADUser -replace @{info=""}
    but i got the following error for every entry in the csv:
    Get-ADUser : Property: 'name' not found in object of type:
    'System.Management.Automation.PSCustomObject'.
    At line:1 char:18
    + $USERS | Foreach{Get-ADUser -filter {cn -eq $_.name}}
    +                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Get-ADUser], ArgumentExcep
       tion
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.ArgumentException,M
       icrosoft.ActiveDirectory.Management.Commands.GetADUser
    something wrong for the filter in the command, someone can help?
    Thanks!

    Added Write-Verbose to help troubleshoot the data being sent to Get-ADUser to make sure that Name actually has data with it.
    Also, the AD module sometimes behaves a little odd when using $_. with the Filter. I've found it better to declare a variable name prior to sending it to the filter like this:
    $USERS = Import-CSV C:\Users\Users2.csv
    $USERS | Foreach{
    Write-Verbose "Name: $($_)" -Verbose
    $Name = $_.Name
    Get-ADUser -filter {cn -eq $Name} | Set-ADUser -replace @{info=""}
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Change content of default.aspx for subsites using Powershell

    Hi.
    I need to update the content of the default.aspx of 60+ subsites in a site Collection. I am able to loop all subsites and get the corresponding default.aspx files using a PowerShell snippet like:
    $site = Get-SPSite -WebApplication https://mysite.domain.no/ -Limit All
    $wc = $site.allwebs | where {$_.url.StartsWith(https://mysite.domain.no/sites/blahblah/blahblahblah) }
    foreach ($web in $wc){
    $file = $web.GetFile("default.aspx")
    The problem is I don't know whether to use the Set-Content command-let or an XMLDocument approach.
    I have the file With the correct content on the local machine. I tried With $file.Parentfolder in order to use
    $f = $web.GetFolder($file.ParentFolder)
    $fc = $f.files
    Get-ChildItem "C:\temp\default.aspx" | foreach {
    $spFileCollection.add($($_.Name),$_.OpenRead(), $true)
    to replace the file but this gives an error on empty folder. Can I use this approach or is there a way to change the actual content of the file?

    Hi Jorgen,
    According to your description, my understanding is that you want to update the page content using PowerShell.
    I suggest you read the content data like below:
    $data = $file.OpenBinary()
    $encode = New-Object System.Text.ASCIIEncoding
    $test = $encode.GetString($data)
    Then you can change the string you want, and then you can save it using SaveBinary() method.
    Here are some detailed articles for your reference:
    Reading the contents of a SharePoint library file using PowerShell
    Using powershell to read/modify/rewrite sharepoint xml document
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How do I bulk upload documents using PowerShell and extract metadata from file name?

    I have a requirement to upload a bunch of documents into a document library. Based on the content type, the rules of updating the metadata is different...the one giving me trouble is to extract the metadata from the file name. If I have a file name like
    "part1_part2_part3.pdf" how do I extract part1, part2, part3 and tag each document being uploaded into SharePoint, using PowerShell? I have searched and have not been able to find anything to get me started.
    Has anyone done this before? Or is there a blog I can take a look at? Thanks
     

    You will have to write a PS script encompassing this logic.
    Read files from the folder using
    Get-Item cmdlet
    Determine the content type based on the path or filename.
    Split the file name to extract the tag names.
    If the metadata fields in the content type is a managed metadata field, check whether the term exists and set it.
    Updating SharePoint Managed Metadata Columns
    with PowerShell
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Removing non printable characters from an excel file using powershell

    Hello,
    anyone know how to remove non printable characters from an excel file using powershell?
    thanks,
    jose.

    To add - Excel is a binary file.  It cannot be managed via external methods easily.  You can write a macro that can do this.  Post in the Excel forum and explain what you are seeing and get the MVPs there to show you how to use the macro facility
    to edit cells.  Outside of cell text "unprintable" characters are a normal part of Excel.
    ¯\_(ツ)_/¯

  • Manage MSMQ is missing from Failover Cluster Manager when configured using powershell

    Hi,
    I am hoping someone would be able to help me as I have looked on the internet for an answer to this. We deploy a number of servers that are configured using Powershell. I am in the process of creating a clustered WIN2K8R2 cluster with MSMQ. I am able to
    do this successfully through the Failover Mgr with no issues.  In addition, I can do this via Powershell (code listed below) with one caveat.
    However, when I create the same exact MSMQ in Powershell, I am unable to right click on the MSMQ service to manage it as the "Manage MSMQ" is missing when I right click on it. The settings are the same, including dependencies. The only difference
    I have been able to find is the icon in the Failover Manager shows the Service as a Generic Service icon when created in Powershell, but when it is created in the GUI it shows up as the MSMQ icon. I was able to verify this in the registry in HKLM\Cluster\Groups\<GUID>\:
    GroupType HEX: 68 for msmq icon. When it is the Generic Service icon it is HEX: 270f. When I change it from 270f to 68, the icon changes in Failover Manager and I am able to open, but then I get an invalid handle and I am unable to manage it.
    This is causing an issue, because I want to automate this build and hand it over, but they would be unable to manage it except by programming which the operators are not ready for.
    Here is the code which I have created in Powershell:
        Write-host "Configuring MS MSMQ Cluster Failover..."
        $CluName = "Cluster Name"
        $ClsMSMQName = $CluName.Name + "MSMQ"
        $ClsMSMQResourceName = "MSMQ-" + $ClsMSMQName
        $Response = Read-host "Enter the IP Address of the Clustered MSMQ"
        $ClsIpRes = get-clusterresource "Cluster IP Address"
        $MSMQIpAddr = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $ipres,Address,$Response
        Add-ClusterServerRole -Name $ClsMSMQName -Storage "Cluster Disk" -StaticAddress $MSMQIpAddr.value
        # Add the MSMSMQ Service to the new Server Role
        Get-ClusterGroup $ClsMSMQName | Add-ClusterResource -Name $ClsMSMQResourceName -ResourceType "MSMQ"
        # Create Dependencies for the MSMQ group
        Add-ClusterResourceDependency $ClsMSMQResourceName $ClsMSMQName
        Add-ClusterResourceDependency $ClsMSMQResourceName "Cluster Disk"
        # Start MSMQ group
        Start-ClusterGroup $ClsMSMQName
    You would just have to change "Cluster Disk" and "Cluster Name".
    Thank you

    Hi,
    I am hoping someone would be able to help me as I have looked on the internet for an answer to this. We deploy a number of servers that are configured using Powershell. I am in the process of creating a clustered WIN2K8R2 cluster with MSMQ. I am able to
    do this successfully through the Failover Mgr with no issues.  In addition, I can do this via Powershell (code listed below) with one caveat.
    However, when I create the same exact MSMQ in Powershell, I am unable to right click on the MSMQ service to manage it as the "Manage MSMQ" is missing when I right click on it. The settings are the same, including dependencies. The only difference
    I have been able to find is the icon in the Failover Manager shows the Service as a Generic Service icon when created in Powershell, but when it is created in the GUI it shows up as the MSMQ icon. I was able to verify this in the registry in HKLM\Cluster\Groups\<GUID>\:
    GroupType HEX: 68 for msmq icon. When it is the Generic Service icon it is HEX: 270f. When I change it from 270f to 68, the icon changes in Failover Manager and I am able to open, but then I get an invalid handle and I am unable to manage it.
    This is causing an issue, because I want to automate this build and hand it over, but they would be unable to manage it except by programming which the operators are not ready for.
    Here is the code which I have created in Powershell:
        Write-host "Configuring MS MSMQ Cluster Failover..."
        $CluName = "Cluster Name"
        $ClsMSMQName = $CluName.Name + "MSMQ"
        $ClsMSMQResourceName = "MSMQ-" + $ClsMSMQName
        $Response = Read-host "Enter the IP Address of the Clustered MSMQ"
        $ClsIpRes = get-clusterresource "Cluster IP Address"
        $MSMQIpAddr = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $ipres,Address,$Response
        Add-ClusterServerRole -Name $ClsMSMQName -Storage "Cluster Disk" -StaticAddress $MSMQIpAddr.value
        # Add the MSMSMQ Service to the new Server Role
        Get-ClusterGroup $ClsMSMQName | Add-ClusterResource -Name $ClsMSMQResourceName -ResourceType "MSMQ"
        # Create Dependencies for the MSMQ group
        Add-ClusterResourceDependency $ClsMSMQResourceName $ClsMSMQName
        Add-ClusterResourceDependency $ClsMSMQResourceName "Cluster Disk"
        # Start MSMQ group
        Start-ClusterGroup $ClsMSMQName
    You would just have to change "Cluster Disk" and "Cluster Name".
    Thank you

  • Unable to remove user from SharePoint Group using PowerShell

    I am trying to remove a user from a SharePoint Group using PowerShell.
    I can see the user in the Site Collection as part of the SharePoint Group, however, when I attempt to run the script, I get an error message stating "Can not find the user with ID: 10"
    Below is the PowerShell script that I am using:
    $url = "https://sharepointdev.spfarm.spcorp.com/sites/desitecoll"
    $userName = "spfarm\sp2013_svc"
    #$userName = "spfarm\spprofileimport";
    $site = New-Object Microsoft.SharePoint.SPSite($url)
    $web = $site.OpenWeb()
    $siteGroups = $web.SiteGroups;
    Clear-Host
    $mySiteGroups = @();
    foreach($group in $siteGroups)
    Write-Host $group
    $mySiteGroups += $group;
    }#foreach
    $members = $web.SiteGroups[$mySiteGroups[0]];
    $owners = $web.SiteGroups[$mySiteGroups[1]];
    $visitors = $web.SiteGroups[$mySiteGroups[2]];
    #Remove the user from the specified SharePoint Group
    $spUser = Get-SPUser -Identity $userName -Web $url
    Write-Host $spUser.ID
    Remove-SPUser -Identity $spUser -Web $url -Group $owners
    $web.Update();
    $web.Dispose();
    Write-Host "User " $userName "removed from " $owners
    Please advise.

    I had to update the code to the following because Get-SPUser was not working properly:
    $url = "https://sharepointdev.spfarm.spcorp.com/sites/desitecoll"
    $userName = "spfarm\spprofileimport";
    $site = New-Object Microsoft.SharePoint.SPSite($url)
    $web = $site.OpenWeb()
    $siteGroups = $web.Groups;
    Clear-Host
    $mySiteGroups = @();
    foreach($group in $siteGroups)
    Write-Host $group
    $mySiteGroups += $group;
    }#foreach
    $members = $web.Groups[$mySiteGroups[0]];
    $owners = $web.Groups[$mySiteGroups[1]];
    $visitors = $web.Groups[$mySiteGroups[2]];
    #Convert the user name to an SPUser account
    $spUser = $web.Site.RootWeb.EnsureUser($userName);
    Write-Host $spUser.ID
    Remove-SPUser -Identity $spUser -Web $url -Group $owners
    $web.Update();
    $web.Dispose();
    Write-Host "User " $userName "removed from " $owners
    Was I not using Get-SPUser correctly?

  • Running a non mandatory program from remote using powershell without a logged in user

    Hi all,
    is there a way to execute a non mandatory program (a task sequence in my case) from remote using powershell
    without a logged in user on the target system?
    I have the following code: 
    $ProgramObject = Get-WmiObject -Class CCM_Program -Namespace "root\ccm\clientsdk" -ComputerName $ComputerItem | Where-Object { $_.Name -match "$ProgramName" }
    Invoke-WmiMethod -class CCM_ProgramsManager -Namespace "root\ccm\clientsdk" -Name ExecutePrograms -argumentlist $ProgramObject -ComputerName $ComputerItem | Out-Null
    Works like charm, but only with a user logged in on the target system what is not a good solution for me. 
    I saw some other ways on the internet but these only work when the program is mandatory.
    Is there a way to archive what I need ? 
    thanks 

    Hi,
    If you deploy the program as a available deployment, there need a user to run the program. Otherwise, the program will never run. This is contradicted with your requirement(run the program at log off).
    So I concur with Peter.
    Best Regards,
    Joyce
    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.

  • Using powershell to rotate which IE window/tab is displayed.

    Hi,
    We are currently working on multiple performance dashboards which are to be hosted within a web browser - due to restrictions within the workplace we HAVE to use Internet Explorer 11.
    I understand that with Google Chrome and Mozilla Firefox there is the capability of rotating through open tabs, this function is however missing from IE.
    We have 4+ dashboards set up which we can load up and view completely fine, what we are aiming to do is to rotate each IE tab so that each dashboard (tab) is showing on the monitor periodically in a loop. I have searched online and found there is
    the PowerShell Community Extensions that seem to do the job but again due to work restrictions - I can only use what comes out of the box with PowerShell, which seems to be limited when trying to do this.
    So I suppose my question(s) is/are:
    Can I periodically loop through tabs within IE using normal PowerShell techniques?
    If not; can I periodically loop through separate IE windows to similar effect?
    It is imperative with the solution that the page doesn't load up a fresh instance of the url as the dashboard displays historic data which is collected real-time.
    Thanks in advance

    Hi Broham21,
    Unfortunately SendKeys is not an option for us as you quite rightly said that they are notoriously unreliable
    Hi mlg_24_05,
    Found your topic quite interesting.
    I used AutoIT script, to test using IE10.
    Open two tabs, with Google.com.sg and Google.com.ph opened.
    And I use this AutoIT script below, and it works fine.
    Let the system delay for 1 second and just display a count down message and the two tabs keep toggling back and forth.. 
    Anyway, it is just a piece of snippet but I hope you can get an idea out of it.
    Here's the code I used:
    ===================
    #include<MsgBoxConstants.au3>
     Local $sText = WinGetTitle("[ACTIVE]")
        ; Display the window title.
           MsgBox($MB_SYSTEMMODAL, "", $sText)
    Local $hWnd = WinGetHandle("Google - Windows Internet Explorer", "")
    For $i = 5 To 1 Step -1
        MsgBox($MB_SYSTEMMODAL, "", "Count down!" & @CRLF & $i)
    Send("^{TAB}")
    Sleep(1000)
    Next
    ;WinClose($hWnd)
    ==============
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

  • How use PHP to read image files from a folder and display them in Flex 3 tilelist.

    Hello. I need help on displaying images from a folder dynamically using PHP and display it on FLEX 3 TileList. Im currently able to read the image files from the folder but i don't know how to display them in the TileList. This is my current code
    PHP :
    PHP Code:
    <?php
    //Open images directory
    $imglist = '';
    $dir = dir("C:\Documents and Settings\april09mpsip\My Documents\Flex Builder 3\PHPTEST\src\Assets\images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "filename: " . $file . "\n";
    $dir->close();
    ?>
    FLEX 3 :
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="pic.send();">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.rpc.events.ResultEvent;
    public var image:Object;
    private function resultHandler(event:ResultEvent):void
    image = (event.result);
    ta1.text = String(event.result);
    private function faultHandler(event:FaultEvent):void
    ta1.text = "Fault Response from HTTPService call:\n ";
    ]]>
    </mx:Script>
    <mx:TileList x="31" y="22" initialize="init();" dataProvider = "{image}" width="630" height="149"/>
    <mx:String id="phpPicture">http://localhost/php/Picture.php</mx:String>
    <mx:HTTPService id="pic" url="{phpPicture}" method="POST"
    result="{resultHandler(event)}" fault="{faultHandler(event)}"/>
    <mx:TextArea x="136" y="325" width="182" height="221" id="ta1" editable="false"/>
    <mx:Label x="136" y="297" text="List of files in the folder" width="182" height="20" fontWeight="bold" fontSize="13"/>
    </mx:Application>
    Thanks. Need help as soon as possbile. URGENT.

    i have made some changes, in the php part too, and following is the resulting code( i tried it, and found that it works.):
    PHP Code:
    <?php
    echo '<?xml version="1.0" encoding="utf-8"?>';
    ?>
    <root>
    <images>
    <?php
    //Open images directory
    $dir = dir("images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "<image>" . $file . "</image>"; // i expect you to use the relative path in $dir, not C:\..........
    //$dir->close();
    ?>
    </images>
    </root>
    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="callPHP();">
    <mx:Script>
    <![CDATA[
    import mx.rpc.http.HTTPService;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var arr:ArrayCollection = new ArrayCollection();
    private function callPHP():void
    var hs:HTTPService = new HTTPService();
    hs.url = 'Picture.php';
    hs.addEventListener( ResultEvent.RESULT, resultHandler );
    hs.addEventListener( FaultEvent.FAULT, faultHandler )
    hs.send();
    private function resultHandler( event:ResultEvent ):void
    arr = event.result.root.images.image as ArrayCollection;
    private function faultHandler( event:FaultEvent ):void
    Alert.show( "Fault Response from HTTPService call:\n " );
    ]]>
    </mx:Script>
    <mx:TileList id="tilelist"
    dataProvider="{arr}">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Image source="images/{data}" />
    </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

  • Download RSS feed as xml file from Sharepoint Online using PowerShell

    Hello
    Our company sharepoint (Office 365) contains also several RSS feeds.
    How it is possible to download xml file out of this feed (website) using PowerShell?
    I can authenticate with sharepoint using CSOM but do not what to do next.
    As service user is not administrator I cannot use "SPOService".
    This script works OK for standard website, but not for Sharepoint.
    $doc = New-Object System.Xml.XmlDocument
    $doc.Load("http://www.{CompanySite}.com/feed/")
    $doc.save("C:\temp\feed.xml")
    I am getting this error when using for company Sharepoint:
    "The remote server returned an error: (403) Forbidden."
    Thanks for your time considering this question.
    Jozin

    Hi Scott,
    thanks for advice.
    Combination of WebClient and Sharepoint Credentials is working OK:
    $client = New-Object System.Net.WebClient 
    $client.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User, $SecurePassword)
    $client.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
    $client.DownloadFile($SiteURL, $file)

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

Maybe you are looking for

  • Report using PDF

    i want to know whether Acrobat Reader which displays the files using PDF extension is included as a part of Internet Explorer or does Acrobat reader needs t obe installed separately. Please help in solving my doubt.

  • General question about storage, networking, and using large amounts of data

    I have been using a powermac tower G5 up until now. I bought my daughter a macbook pro 15" i7, talk about a zippy little machine. What a screamer. I can't believe how fast it is with final cut express, Aperture, and Photoshop. I tend to use higher en

  • When is the new ios 7 going to be available

    does anyone know when the ios 7 is going to be available

  • About fcntl()

    hi, i wanted to know that does Solaris O.S has F_Notify flag in fcntl() to monitor if the files In a Directiory are changed(created,modified,deleted). Moreover I would like to ask that, is there an way to find out which file(name of the file) has bee

  • Forum search doesn't work properly

    try this: in the JDeveloper forum search on JBO-25046. you will NOT find any hits. Same if you just search on 25046. Search on jbo-25046 and you will find thousands of hits referencing jbo without a number. search on RowNotAvailableException (the act