Psremoting 4.0

I was wondering if someone could help me with a strange issue going on.
We have been enabling psremoting via gpo for years on 3.0 using the computer config/policies/admin templates/windows components/windows remote management/winrm service/allow remote.
All has been good.
Then one of my image guys put framework 4.5 out and it has broken it being enabled. If i run enable-psremoting on the machine it is fine after that. Here is the output from running that.
WinRM is already set up to receive requests on this computer.
WinRM has been updated for remote management.
WinRM firewall exception enabled.
Looking for any ideas here?
Thanks

Hi JustuslV,
If you can use powershell job to run the cmdlet "enable-psremoting -force" on remote computers as a workaroud,
If the servers in doamin can apply the group policy, how about saving the cmdlet "enable-psremoting -force" as .ps1 and deploy the powershell script in startup or logon script.
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
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]

Similar Messages

  • Group Policy enable-psremoting

    I have been working on this for the last 10 hours. I cannot seem to get it working. I followed all of the steps from 
    http://www.briantist.com/how-to/powershell-remoting-group-policy/
    Under the Security Filtering I have a PC name with a user just for testing.
    Here is my code: Enter-PSSession -ComputerName localhost
    Just trying to verify that it is working. I have no idea what to do know. I have tried everything. Anytime I do Enable-psremoting -force the code works fine.
    The error I am receiving is as follows.
    Enter-PSSession : Connecting to remote server localhost failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:1

    I just deleted the last GP and made a new one. The only thing I did was:
    Policies/Administrative Templates /Windows Components/Windows
    Remote Management (WinRM)/WinRM Service
        Allow Remote Server management through
    WinRM
        Set the Policy to Enabled.
        Set the IPv4 and IPv6 filters to *
    I run PS as administrator and still receive the error access is denied.
    The only machines on the network are Win7/Win8    Serv2008R2/Serv2012
    Follow the rest of th0e instructions in the link I just posted.  It is a more up to date discussion of how to do this.  Be sure to read the complete article.  Ask questions if you do not understand what he is asming you to do.
    ¯\_(ツ)_/¯

  • PSRemoting Domain Controllers 2008 R2

    I am new to powershell and ps remoting but I cannot get remoting to work on my DC's. I followed to same steps on non-DC and they work on the first try. All I am running is this command (Enable-PSRemoting -Force). I have tried turning off the firewall, Management
    Framework 3 & 4. On my non-DC systems I can connect using Enter-PSSession without issue. When connecting to the DCs here is what I get.
    Enter-PSSession : Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is 
    running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the 
    following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic.
    I have also tested connections with (winrm) and again on the DCs I get this error.
    WSManFault
      Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination,
    most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
    Error number:  -2144108526 0x80338012
    The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly
    IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
    I have tried a lot of troubleshoot, tips, manual configurations and I keep coming up empty. The DCs are dedicated to domain services and DNS. I have two DCs, I am using a workstation in the domain. Any ideas?

    Fixed it! Apparently someone before me had experimented with this and somehow got a few registry values in the DC GPO
    Software\Policies\Microsoft\Windows\WinRM\Service\AllowAutoConfig
    Software\Policies\Microsoft\Windows\WinRM\Service\IPv4Filter
    Software\Policies\Microsoft\Windows\WinRM\Service\IPv6Filter
    They were listed under Extra Registry Settings and apparently you need the original ADM file to edit these. So I had to use the nuclear option and dcgpofix /target:DC
    Well at least it works now and I know I have a clean GPO. 

  • Error executing Enable-PSRemoting or Set-WSManQuickConfig on XP Home

    I receive the following error when I execute Enable-PSRemoting and confirm I want to continue:
    Set-WSManQuickConfig : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="cav"><f:Message>Access is denied. </f:Message></f:WSManFault>
    At line:50 char:33
    +             Set-WSManQuickConfig <<<<  -force
        + CategoryInfo          : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException
        + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand
    The same error - just a different line number - occurs when I run Set-WSManQuickConfig.
    I have seen this similar post here (http://social.technet.microsoft.com/Forums/en/winserverpowershell/thread/e1eabe4c-0796-420e-b03e-dffc71760b8d) but the solution - running secpol.msc to set the local security policy to Classic - doesn't work since XP Home doesn't include secpol.msc.
    Does anyone have any suggestions? 
    Thanks,
    Tim

    Looks like the link from previous post is dead.  Maybe
    this is the post that was being referred to.  
    Changing the prescribed setting did resolve the access denied error message on a Windows XP Pro machine.  Even though there is no secpol.msc on Windows XP Home, you can make the same change by manually modifying the following registry
    key like so:
    HKEY_LOCAL_MACHINE\system\currentcontrolset\control\lsa\forceguest  REG_DWORD       0x0
    This change however did not resolve the winrm quick config access denied error on a Windows XP Home computer.  The previous poster made no specific mention of XP Home Edition, so I can only assume the "fix" worked on an XP Pro computer.
    I also tried adding:
    HKEY_LOCAL_MACHINE\software\microsoft\Windows\currentversion\policies\system\LocalAccountTokenFilterPolicy       REG_DWORD       0x1 
    As suggested by this post:  http://www.shirmanov.com/2011/04/winrm-access-is-denied-on-local.html
    ...but that did not help either.
    I think this has something to do with fact that the administrator account is prohibited from logging into the desktop on a normal XP Home boot.  So far I have not figured a way around this except for booting into safe-mode.  
    I did try running winrm "quickconfig" while logged as the administrator during a safe-mode with network support boot and got the same error message.   
    WSManFault
    Message = Access is denied.
    Error number:  -2147024891 0x80070005
    Access is denied.
    The only other thing that I can think to try right now is to clone the built-in administrator account, then log as the cloned account during a normal boot, and try running winrm quickconfig.

  • Server 2012 R2 Remote Desktop Connection Broker

    I have installed RDS on a server named PLUTO on which Windows 2012 R2 datacenter is in. There is a domain controller (domain name: AGROSY) running on a Linux server. We have used Samba 3.6.6 to control the file sharing system.
    When I attempt to install RDS in Server Manager, it states as following: could not retrieve the deployment information from RD connection broker server pluto.AGROSY.
    Then, I searched a lot of solutions, e.g.  and tried as following:
    Enter-PSSession -ComputerName pluto   --> which works;
    but Enter-PSSession -ComputerName pluto.AGROSY   --> which gives the error message as: Enter-PSSession : Connecting to remote server pluto.AGROSY failed with the following error message : WinRM cannot process the request. The following
    error with errorcode 0x80090311  occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request.
    If I ping the pluto.AGROSY, it works as well.
    I have no idea how it can be solved, please help me out. Thanks a lot!

    Hi,
    Thanks for your comment. Sorry for late reply.
    Initially please enable the PowerShell remoting in your case. 
    Enable-PSRemoting
    http://technet.microsoft.com/en-us/library/hh849694.aspx
    For FQDN name, please see that RDCB is properly configured and also certificate which you have used for RDS environment must be trusted with its private key and must match the FQDN name of the server. Did you seen the certificate has been properly used and
    configured. You can go through following article for certificate and also for configuring RDCB role.
    Configuring RDS 2012 Certificates and SSO
    Configuring HA for the Remote Desktop Connection Broker in a 2012 RDS Farm
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • [Forum FAQ] "Unable to connect to the server by using Windows PowerShell Remoting" error while installing RDS roles on Server 2012 R2

    When you try to install RDS role on server 2012 R2 using standard deployment, this issue may occur (Figure 1).
    “Unable to connect to the server by using Windows PowerShell remoting”.
    Figure 1: Unable to connect to the server by using Windows PowerShell remoting
    First of all, we need to verify the configurations as it suggested:
    1. The server must be available by using Windows PowerShell remotely.
    2. The server must be joined to a domain.
    3. The server must be running at least Windows Server 2012 R2.
    4. The currently logged on user must be a member of the local Administrators group on the server.
    5. Remote Desktop Services connections must be enabled by using Group Policy.
    In addition, we need to check if the “Windows Remote Management “service is running and related firewall exceptions have been created for WinRM listener.
    To enabling PowerShell remoting, we can run this PowerShell command as administrator (Figure 2).
    Enable-PSRemoting -Force
    Figure 2: Enable PowerShell Remoting
    However, if issue persists, we need to check whether it has enough memory to work.
    By default, remote shell allots only 150 MB of memory. If we have IIS or SharePoint App pool, 150 MB of memory is not sufficient to perform the remoting task. Therefore, we need to increase
    the memory via the PowerShell command below:
    Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000
    Then, you need to restart the server and the issue should be resolved.
    You can get more information regarding Remote Troubleshooting by below link:
    about_Remote_Troubleshooting
    If you need further assistance, welcome to post your questions in the
    RDS forum.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    i found another possible reason, this solution worked for me:
    http://oyvindnilsen.com/solution-for-powershell-remoting-error-it-cannot-determine-the-content-type-of-the-http-response-from-the-destination-computer/
    I tried to set up powershell remoting on a server and kept getting this error:
    Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cann
    ot process the request. It cannot determine the content type of the HTTP response from the destination comput
    er. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help to
    pic.
    After a bit of troubleshooting I discovered that the problem was that the authentication packets was to big (over 16k), this will cause WinRM to reject the request. The reason for authentication packets getting too big can be because the user is member of very
    many security groups or in my case because of the SidHistory attribute.
    The solution was to increase the MaxFieldLength and MaxRequestBytes keys in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters
    If the keys does not exists you can create them, be sure to use the DWORD type.
    I sat MaxFieldLength to DEC value 40000 and MaxRequestBytes to DEC value 32768 and rebooted the server. Problem solved.

  • 2012 R2 hyper-V Server - How to use it

    I have just installed Hyper-V Server 2012 R2.
    I thought I could work my way through using this product, but I can't figure it out.
    There is no GUI on the server, which is good, but for the life of me I can't firgure out how to remotely administer this thing.
    I have followed instructions to install the Hyper-V management tools on Windows 7 and 8, but they will not connect.
    I get a long laboriuos messages about permissions and HTTPS etc.
    Can anyone who understands this system please point me to a guide that explains how to start and access a fresh copy of this product, Hyper-V Server 2012 R2.
    I am not intending to connect to a domain at this point. I just want to install this stand alone Hyper-V sever and start setting VM's that I can access via RDP.

    Yay, all working now. Can't miss a single step with this, or no go.
    Thanks for all the help and comments.
    Using the following links (from posts above), and my summary listed below got me going:
    http://www.msserverpro.com/installing-and-configuring-microsoft-hyper-v-server-2012-for-remote-management-using-the-hvremote-tool-in-workgroup-scenarios/
    http://code.msdn.microsoft.com/Hyper-V-Remote-Management-26d127c6
    On Server:
    1) Installed Hyper-V 2012 R2
    2) Got HVREMOTE.WSF - Copy to C:\HVREMOTE
    3) netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
    4) Enable Remote Management
    5) Enable Ping
    6) Added local admin - used exactly same Username and Password to log into remote Workgroup PC.
    7) Run: cscript hvremote.wsf /add:Username
    Client PC:
    1) Add Windows Features - Hyper-V Management Tools
    2) Run: cscript hvremote.wsf /anondcom:grant
    To Remote Powershell to Server:
    ref: http://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/
    Did all the below in In Powershell on both server and client PC:
    1) Enable-PSRemoting -Force
    2) Set-Item wsman:\localhost\client\trustedhosts Remote_PC_Name  (or * for any PC)
    3) Restart-Service WinRM
    4) Test-WsMan COMPUTER
    To remote from client PC to Server, in Powershell: Enter-PSSession -ComputerName COMPUTER -Credential USER

  • [Forum FAQ] How to install and configure Windows Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely

    As we all know,
    the Windows Server Essentials Experience role is available in Windows Server 2012 R2 Standard and Windows Server 2012 R2 Datacenter. We can add the Windows Server
    Essentials Experience role in Server Manager or via Windows PowerShell.
    In this article, we introduce the steps to install and configure Windows
    Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely. For better analyze, we divide this article into two parts.
    Before installing the Windows Server Essentials Experience Role, please use
    Get-WindowsFeature
    PowerShell cmdlet to ensure the Windows Server Essentials Experience (ServerEssentialsRole) is available. (Figure 1)
    Figure 1.
    Part 1: Install Windows Server Essentials Experience role locally
    Add Windows Server Essentials Experience role
    Run Windows PowerShell as administrator, then type
    Add-WindowsFeature ServerEssentialsRole cmdlet to install Windows Server Essentials Experience role. (Figure 2)
    Figure 2.
    Note: It is necessary to configure Windows Server Essentials Experience (Post-deployment Configuration). Otherwise, you will encounter following issue when opening Dashboard.
    (Figure 3)
    Figure 3.
      2. Configure Windows Server Essentials Experience role
    (1)  In an existing domain environment
    Firstly, please join the Windows Server 2012 R2 Standard computer to the existing domain through the path:
    Control Panel\System\Change Settings\”Change…”\Member of. (Figure 4)
    Figure 4.
    After that, please install Windows Server Essentials Experience role as original description. After installation completed, please use the following command to configure Windows
    Server Essentials:
    Start-WssConfigurationService –Credential <Your Credential>
    Note: The type of
    Your Credential should be as: Domain-Name\Domain-User-Account.
    You must be a member of the Enterprise Admin group and Domain Admin group in Active Directory when using the command above to configure Windows Server Essentials. (Figure 5)
    Figure 5.
    Next, you can type the password for the domain account. (Figure 6)
    Figure 6.
    After setting the credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 7)
    Figure 7.
    By the way, you can use
    Get-WssConfigurationStatus
    PowerShell cmdlet to
    get the status of the configuration of Windows Server Essentials. Specify the
    ShowProgress parameter to view a progress indicator. (Figure 8)
    Figure 8.
    (2) In a non-domain environment
    Open PowerShell (Run as Administrator) on the Windows Server 2012 R2 Standard and type following PowerShell cmdlets: (Figure 9)
    Start-WssConfigurationService -CompanyName "xxx" -DNSName "xxx" -NetBiosName "xxx" -ComputerName "xxx” –NewAdminCredential $cred
    Figure 9.
    After you type the commands above and click Enter, you can create a new administrator credential. (Figure 10)
    After creating the new administrator credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 11)
    After a reboot, all the configurations will be completed and you can open the Windows Server Essentials Dashboard without any errors. (Figure 12)
    Figure 12.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Part 2: Install and configure Windows Server Essentials Experience role remotely
    In an existing domain environment
    In an existing domain environment, please use following command to provide credential and then add Server Essentials Role: (Figure 13)
    Add-WindowsFeature -Name ServerEssentialsRole
    -ComputerName xxx -Credential DomainName\DomainAccount
    Figure 13.
    After you enter the credential, it will start install Windows Server Essentials role on your computer. (Figure 14)
    Figure 14.
    After the installation completes, it will return the result as below:
    Figure 15.
    Next, please use the
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with a remote computer. You can use the commands below:
    Enter-PSSession –ComputerName
    xxx –Credential DomainName\DomainAccount (Figure 16)
    Figure 16.
    Then, please configure Server Essentials Role via
    Add-WssConfigurationService cmdlet and it also needs to provide correct credential. (Figure 17)
    Figure 17.
    After your credential is accepted, it will update and prepare your server. (Figure 18)
    Figure 18.
    After that, please type “Y” to continue to configure Windows Server Essentials. (Figure 19)
    Figure 19.
    2. In a non-domain environment
    In my test environment, I set up two computers running Windows Server 2012 R2 Standard and use Server1 as a target computer. The IP addresses for the two computers are as
    below:
    Sevrer1: 192.168.1.54
    Server2: 192.168.1.53
    Run
    Enable-PSRemoting –Force on Server1. (Figure 20)
    Figure 20.
    Since there is no existing domain, it is necessary to add the target computer (Server1) to a TrustedHosts list (maintained by WinRM) on Server 2. We can use following command
    to
    add the TrustedHosts entry:
    Set-Item WSMan:\localhost\Client\TrustedHosts IP-Address
    (Figure 21)
    Figure 21.
    Next, we can use
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with the remote computer. (Figure 22)
    Figure 22.
    After that, you can install Windows Server Essentials Experience Role remotely via Add-WindowsFeature ServerEssentialsRole cmdlet. (Figure 23)
    Figure 23.
    From figure 24, we can see that the installation is completed.
    Figure 24.
    Then you can use
    Start-WssConfigurationService cmdlet to configure Essentials Role and follow the steps in the first part (configure Windows Server Essentials Experience in a non-domain environment) as the steps would be the same.
    The figure below shows the status of Windows Server Essentials.
    Figure
    25.
    Finally, we have successfully configured Windows Server Essentials on Server1. (Figure 26)
    Figure 26.
    More information:
    [Forum
    FAQ] Introduce Windows Powershell Remoting
    Windows Server Essentials Setup Cmdlets
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • Cant open EMC or EMS for exchange 2010 from local machine

    hi
    im having problem with Exchange 2010.
    After instalation everything was working fine but second day  when i try to open EMC im getting following error:
    Initialization failed
    The following error occured when searching for on-premises exchange server
    connecting to remote server failed with following message: Client of WinRM service received from WS-managment code HTTP 403. ....
    from EMS i get following:
    [server.domain.net] Connecting to remote server failed with the following error message : Klient služ
    l od vzdálené služby WS-Management kód stavu HTTP 403. For more information, see the about_Remote_Troubl
    topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemoti
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    Im trying to open it from computer where is Exch located with Administrator account.
    I done some searching around but nothing works for me. any ideas ??
    Regards

    Thanks for reply
    Server which is running Exchange 2010 SP1 is Win. 2008 R2
     article on http://technet.microsoft.com/hi-in/library/dd351136(en-us).aspx explains my problem (i hope) , but i have no idea how to repair it.
    <!-- ApplyClick with current id -->  Incorrect Virtual Directory Name
    <!---->
    You can receive the following error message if you specify the wrong virtual directory when connecting to a remote Exchange 2010 server. To resolve this issue, verify the virtual directory name. For more information, see Connect Remote Exchange Management Shell to an Exchange Server.
    ExchServer] Connecting to remote server failed with the following error message : The WinRM client received an HTTP
    status code of 403 from the remote WS-Management service. For more information, see the about_Remote_Troubleshooting Help
    topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    and powershell log contais this :
    Details:
     ProviderName=WSMan
     NewProviderState=Started
     SequenceNumber=1
     HostName=Exchange Management Console
     HostVersion=14.0.0.0
     HostId=749dc4c6-53c1-4363-81d9-8192b78af507
     EngineVersion=
     RunspaceId=
     PipelineId=
     CommandName=
     CommandType=
     ScriptName=
     CommandPath=
     CommandLine=
    Kód XML události:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="PowerShell" />
        <EventID Qualifiers="0">600</EventID>
        <Level>4</Level>
        <Task>6</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2010-01-13T08:11:07.000000000Z" />
        <EventRecordID>1870</EventRecordID>
        <Channel>Windows PowerShell</Channel>
        <Computer>EXMDB01.thinwork.net</Computer>
        <Security />
      </System>
      <EventData>
        <Data>WSMan</Data>
        <Data>Started</Data>
        <Data> ProviderName=WSMan
     NewProviderState=Started
     SequenceNumber=1
     HostName=Exchange Management Console
     HostVersion=14.0.0.0
     HostId=749dc4c6-53c1-4363-81d9-8192b78af507
     EngineVersion=
     RunspaceId=
     PipelineId=
     CommandName=
     CommandType=
     ScriptName=
     CommandPath=
     CommandLine=</Data>
      </EventData>
    </Event>
    regards

  • Batch Resize photos Larger than a certain size.

    Is there a way to have a script that searches a directory and any image files that are larger than 1000 x 1000 pixels are resized to 500 x 500 pixels and then saved over righting the sources file?
    I am asking because our server has over 40,000 photos all over the place and I would like to reduce the space they take on the server.

    I don't think that getting the file's length is the best way to determine if the file needs resizing. Especially if the file is in a format that supports compression. I think you would end up either setting the test value too low and open a lot of files that don't need resizing or set too high and miss files that do.
    Also using getFiles() without a file mask will get all files and folders in the source folder. You will need to make sure it is an image file before trying to open in Photoshop to resize.
    I think the function below would be a better way to determine if the file needs resizing. It tries to get the XMPMetadata to determine width and height. If that fails because the file does not have metadata it gets the size from Bridge.
    var file = new File('~/desktop/_SLP7637.jpg');
    var resize = needsResizing( file );
    var resizeStr = ''
    resize? resizeStr = 'needs resizing': resizeStr = 'does not need resizing';
    alert(file.fsName+" "+resizeStr);
    function needsResizing( file ){
        try{
            loadXMPLibrary();
            var xmpf = new XMPFile( file.fsName, XMPConst.UNKNOWN,
                                       XMPConst.OPEN_FOR_READ );
            var xmp = xmpf.getXMP();
            xmpf.closeFile();
            var dim = xmp.getProperty( XMPConst.NS_EXIF, 'PixelXDimension', XMPConst.STRING)+','+xmp.getProperty( XMPConst.NS_EXIF, 'PixelYDimension', XMPConst.STRING);
            dim = dim.split(',');
            unloadXMPLibrary();
            if(dim=="undefined,undefined"){
                var dim = undefined;
                var res = undefined;
                var bt = new BridgeTalk;
                bt.target = "bridge";
                var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+file.toSource()+");");
                bt.body = myScript;
                bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
                bt.send(10);
                function myReturnValue(str){
                    res = str;
                    dim = str.split(',');
                function psRemote(file){
                    var t= new Thumbnail(file);
                    return t.core.quickMetadata.width+','+t.core.quickMetadata.height;
        }catch(e){unloadXMPLibrary();}
        var res = true;
        if(dim[0]<1001&&dim[1]<1001) res = false;
        return res;
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject
                                                                ('lib:AdobeXMPScript');
              }catch (e){
                   alert( ErrStrs.XMPLIB );
                   return false;
         return true;
    function unloadXMPLibrary(){
       if( ExternalObject.AdobeXMPScript ) {
          try{
             ExternalObject.AdobeXMPScript.unload();
             ExternalObject.AdobeXMPScript = undefined;
          }catch (e){
             alert( ErrStrs.XMPLIB );

  • How to force group policy update remotely in a bunch of desktops(computers name in a textfile) by using powershell script?

    Hi,
    I want to force group policy on a collection of computers remotely.The name of computers can be stored in a text file.
    By using this info. (about computer names) , Could you please guide me writing a Powershell script for this.
    Thanks in advance.
    Daya

    This requires that PSRemoting is enabled in your environment.
    $Computers = Get-Content -Path 'C:\computers.txt'
    Invoke-Command -ComputerName $Computers -ScriptBlock {
    GPUpdate /Force

  • Active Directory error "-2147016672"

    Hi,
    I am creating a script in ASP.NET C# to invoke cmdlets from Lync Server.
    I want just list a user : Get-CsUSer and when i run the script i received the follow error code:
    Active Directory error "-2147016672" occurred while searching for domain controllers in domain .
    I run my script from my local machine developer (it is remote) to the server. The script is :
    Runspace remoteRunspace = null;
    openRunspace("servidor:5985/wsman", "http://schemas.microsoft.com/powershell/Microsoft.PowerShell",
    @"\user", "senha", ref remoteRunspace);
    using (PowerShell powershell = PowerShell.Create())
    powershell.Runspace = remoteRunspace;
    powershell.AddScript("Import-Module Lync"); //funciona
    powershell.Invoke();
    Pipeline pipeline = remoteRunspace.CreatePipeline();
    string remoteScript = "Get-CsUser -Identity mmiranda";
    pipeline.Commands.AddScript(remoteScript);
    Collection<PSObject> results = pipeline.Invoke();
    remoteRunspace.Close();
    return results;
    public static void openRunspace(string uri, string schema, string username, string livePass, ref Runspace remoteRunspace)
    System.Security.SecureString password = new System.Security.SecureString();
    foreach (char c in livePass.ToCharArray())
    password.AppendChar(c);
    PSCredential psc = new PSCredential(username, password);
    WSManConnectionInfo rri = new WSManConnectionInfo(new Uri(uri), schema, psc);
    //rri.AuthenticationMechanism = AuthenticationMechanism.Default;
    //rri.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
    //rri.AuthenticationMechanism = AuthenticationMechanism.Basic;
    //rri.NoEncryption = true;
    rri.ProxyAuthentication = AuthenticationMechanism.Negotiate;
    remoteRunspace = RunspaceFactory.CreateRunspace(rri);
    remoteRunspace.Open();
    i don't know what to do anymore.
    Help me.
    My e-mail [email protected]
    thx

    Hi,gersonczjr
    Would you please verify that the user account you used has all the required permission?
    Would you please use DCDiag tool to check the DC connectivity?
    Although I am not very familar with scripts,I remeber I have seen a similar case with running Get-CsUser using C# is fixed by called
    Enable-PsRemoting on ther server,you can try it to see if it also works for you.
    Regards,
    Sharon
    Sharon Shen
    TechNet Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

  • Batch Combining two files together into one

    hi everyone, first time poster here and i would greatly appreciate any help in my dilemma.
    im trying to batch process images into a single file using a script i got from the link below.
    Ok, my problem....merging two unique files batch Process
    my only issue im having is that i want the new batched file names to retain the foreground image file name.
    right now the batched file name is "file0001.psd", "file0002.psd", and so on.
    thanks for your help,
    Greg

    File Basics:
    The jpg file format does not support layer. You are better off creating your layer file as a PSD and then generate a jpg file.
    The PSD will be the master file for archiving and the JPG the working file.
    Save the script as batchStaks.jsx in the Bridge Start up script folder.
    Bridge >> Preferences >>Startup Scripts >> Reveal My Startup Scripts
    Restart Bridge.
    Create a Bridge stack
    Bridge >> Stacks >> Group as Stack
    Execute the batchStacks.jsx script from the Bridge Tools Menu
    Bridge >> Tools >> Batch Sctacks 2.2.0
    The script will save a layered PSD file in the same folder as the original file.
    The layered PSD file will retain the name of the image behind the thumbnail stack thumbnail.
    You need to experiment in Bridge with the image stack order to get the result you want.
    What I do to create layered file which retains the name of the thumbnail image stack is:
    I create a photoshop action which reverses the layer order.
    Then I have the script run the action while it creates the layered file.
    The result is a layered file that retains the filename of the thumbnail image stack. 
    The limitation is that the script dependes on the action file tho.
    #target bridge 
    @@@START_XML@@@
    <?xml version="1.0" encoding="UTF-8"?>
    <ScriptInfo xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en_US">
         <dc:title>Batch Stack 2.2.0</dc:title>
         <dc:description>The script loads Bridge Stacks as Photoshop layes and returns a layerd PSD file.</dc:description>
    </ScriptInfo>
    @@@END_XML@@@
    app.bringToFront();
    if( BridgeTalk.appName == "bridge" ) {    
        var batchStack = new MenuElement( "command","Batch Srtacks 2.2.0", "at the end of Tools" ); 
    batchStack .onSelect = function () {  
        var stacks = app.document.stacks; 
        var stackCount = stacks.length;
        for(var s = 0;s<stackCount;s++){ 
              var stackFiles = getStackFiles( stacks[s] ); 
              if(stackFiles.length> 1){ 
                   var bt = new BridgeTalk; 
                   bt.target = "photoshop"; 
                   var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+stackFiles.toSource()+");"); 
                   bt.body = myScript; 
                   bt.send(5); 
        function getStackFiles( stack ){ 
              var files = new Array(); 
              for( var f = 0; f<stack.thumbnails.length;f++){ 
              files.push(stack.thumbnails[f].spec); 
             return files; 
        function psRemote(stackFiles){ 
            app.bringToFront(); 
            var thisDoc = open(File(stackFiles[0])); 
            var Name = decodeURI(app.activeDocument.name).slice(0,-4); 
            thisDoc.layers[0].name = decodeURI(Name);
        for(var a = 1;a<stackFiles.length;a++){ 
            open(File(stackFiles[a])); 
            Name = decodeURI(app.activeDocument.name).slice(0,-4); 
            activeDocument.activeLayer.duplicate(thisDoc); 
            app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); 
            thisDoc.layers[0].name = Name;       
            var psdOptions = new PhotoshopSaveOptions();
            psdOptions.embedColorProfile = true;
            psdOptions.alphaChannels = true;
            psdOptions.layers = true;
            psdOptions.spotColors = true;     
            var name = app.activeDocument.name.replace(/\.[^\.]+$/, '');        
            var path = app.activeDocument.path;
            var saveFile = File(path + "/" + name );
            app.activeDocument.saveAs(saveFile, psdOptions, true); 
            app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);   

  • [Forum FAQ] Introduce Windows Powershell Remoting

    This article will introduce three methods of Windows Powershell Remoting:
    Method 1: WMI
    Remoting Cmdlet: Get-WMIObject
    Protocols: WMI/RPC/DCOM
    Port: Random port
    Data Encryption: Clear text
    Note: No need of the WinRM’s installation and configuration
    Method 2: PowerShell Remoting Commands
    Remoting Cmdlet: Invoke-Command
    Protocols: HTTP (wsman), MIME, SOAP, XML
    Port: 5985
    Data Encryption: Encrypted
    Note: Support any cmdlets in the parameter scriptblock, however, need the computer install WinRM, and also need to configure the WinRM on the remote computer.
    Method 3: PowerShell Remoting Interactively
    Remoting Cmdlet: Enter-PSSession
    Protocols: HTTP (wsman), MIME, SOAP, XML
    Port: 5985
    Data Encryption: Encrypted
    Note: Support any cmdlets, all cmdlets you type are executed as if they were typed on the console of the remote computer. However, need the computer install WinRM, and also need
    to configure the WinRM on the remote computer.

    2. Powershell remote in the same domain with WinRM installed:  Invoke-Command, Enter-PSSession
    2.1 PowerShell Remoting Commands: Invoke-Command
    If you only have a couple of commands to execute on the remote computer in the same domain, you can use the
    Invoke-Command cmdlet.
    For example: Server1 want to remote manage Server2
    1) Enable powershell remoting on Server2
    Launch Windows Powershell as “Run as Administrator” on server2, and run:
    Enable-PSRemoting –Force
    Note:  
    In Server 2012 (but not Windows 8), PowerShell remoting is enabled by default, so you don't need to do anything.
    2) Run invoke-command on server1
    Invoke-Command -ComputerName server2 -Credential domain\username -ScriptBlock {get-process}
    If the user account run with Powershell has the admin permission, there is no need to specify the credential parameter.
    The script above will run the cmdlet “get-process” on server2, and a temporary connection will be built, the result returned to server1, and the connection broken.
    If you want to run powershell script .ps1 file on server2, however, this script is stored on server1, you can achieve as below:
    Invoke-Command -ComputerName server2 -Credential domain\username -FilePath d:\1.ps1
    2.2 PowerShell Remoting Interactively: Enter-PSSession
    To work interactively, use
    Enter-PSSession to connect to a remote session, all the cmdlets you typed in your local console is executed on the remote system until you leave the remote session by using
    Exit-PSSession.
    After configure the WinRM on server2, you can run
    enter-pssession on server1 (Figure 3):
    Figure 3:  remote with enter-pssession
    2.3 Powershell remote with Pssession:  New-Pssession
    Whenever you use Windows PowerShell Remoting with the ComputerName parameter, a temporary session is created for you and used only for this particular command. Once the command
    completes, the session is automatically closed.
    If you start to access remote systems more often or would like to keep the session state, a more efficient way is to create sessions yourself and keep them around until you no longer
    need them. To achieve this, instead of specifying the parameter computername, you can also specify Pssession in the Session parameter of the cmdlets
    invoke-command and enter-pssession (Figure 4).
    Figure 4:  persistent session
    If there is no need to use the Pssession, you can use the cmdlet
    Remove-PSSession to close the session.

  • BPA for SQL Server

    Hi Experts,
    Need to configure BPA 2008 R2 and 2012. Can you please help confirm if needed to run this tool for remote scan of SQL Servers,i.e install BPA on one central server and use it to scan the rest of the SQL servers in the environment, it is needed to run the
    below metioned command on the remote servers through powershell :
    1. Enable Remoting using "Enable-PSRemoting".
    2. Configure MaxShellsPerUser using "winrm set winrm/config/winrs `@`{MaxShellsPerUser=`"10`"`}" .
    a)Is there anything else needed to be done on the remote servers to allow BPA to run.
    b)Does it differ operating system wise.
    b)How do i reverse these commands after my scan is done.
    Thanks

    Hi,
    The latest version of Best Practices Analyzer for SQL Server is SQL Server 2012 Best Practices Analyzer.
    You can download it from
    http://www.microsoft.com/en-us/download/details.aspx?id=29302
    I will update this thread when there is any update for SQL Server 2014 version.
    Thanks.
    Tracy Cai
    TechNet Community Support

Maybe you are looking for

  • How can an Interaction Activity be locked out from further edits once final

    Not sure if this is the right forum for this.  I am trying to understand if there is an easy config handle to prevent Interaction Activities created in CRM from being edited once they have been Finalized or Completed and appear in Interaction History

  • Unreliable Wifi in Windows 8.1 on new MacBookPro Retina Late 2013

    I received a new MacBook Pro with Mavericks this week. I installed Windows 8.1 via bootcamp. The install went perfectly and everything is working except every few minutes its looses its wifi connection. Turning wifi off and on temporarily fixes the p

  • Acrobat 9 PRO - Forms Tracker Question

    1. When distributing a form via acrobat.com to multiple targets, can I keep email addresses confidential from individual members on the distribution list? 2. When distributing a form to multiple email addresses simultaneously, is it possible to creat

  • Display all of the following properties for Get-ADDomain

    How do you display all of the following properties: Get-ADDomain ???,cn=mysite,cn=com; Property Syntax R/RW lDAPDisplayName AllowedDNSSuffixes ADCollection RW msDS-AllowedDNSSuffixes ChildDomains ADCollection R dnsRoot of crossRef objects where trust

  • Do you have to upload all new pages if you edited the template file?

    I've edited a template in Dreamweaver and applied all changes to pages that use this template. Previously, I had been uploading the templates onto my server, but after realizing that uploading the edited template to the web the pages didn't change. W