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

Similar Messages

  • Intermittend DNS resolution, timeserver, group policy updates errors in client logs in Win 2012 R2 single server environement

    We recently switched hardware and server software Win SBS 2008 to 2012R2 for a small network roughly 40 clients (Win7 Pro / Win 8.1 Pro) about 16 running concurrently at a given time and one network printer with the printer queue residing on the DC as well.
    I read that a single server environment might not be ideal in particular no fail-over but that is an accepted risk in this particular network here.
    Errors:
    Error 1043: Timeout during name resolution request
    Error 1129: Group policy updates could not be processed due to DC not available
    Error 5719: Could not establish secure connection to DC, DC not available
    Occasionally but disappears after a while
    Error 134: As a result of a DNS resolution timeout could not reach time server
    Symptoms
    On Win 7 Clients
    Network shares added through Group Policy will not show sometimes
    Network shares disconnect (red X) and when accessed return access authorization error after one or two clicks on the share finally grant access again
    When the issue with accessing network shares occurs, it usually also affects Internet access meaning a 'server not responding' error appears in the browser windows when trying to open just any web page
    nslookup during the incident returns cannot resolve error
    ipconfig on client shows correct default router (VDSL Router) and DHCP / DNS Domain Controller
    Also, the Win system log shows the above errors during these incidents, however, the nuimber of incidents vary from 20-30
    On Win 8.1 Clients
    Same as above with the slight variation for network shares apparently due to Server 2012 and Win 8.1 clients managing drive shares differently. However, network share refresh does not work with this clients. In most cases only a gpupdate /force returns
    drive shares but usually only for the active session. After logoff / logon the shares are gone again.
    The issue does appear to be load related since it occurs even if there are only one or two workstations active.
    Server Configuration
    Dell R320 PowerEdge 16GB / 4TB 7200RPM RAID10 / GBitEthernet
    Zyxel 1910-48 Port Switch
    VDSL 50Mbps Down / 20Mbps Up
    Since the DC is the only local DNS and there are no plans to add another one or move DNS to another server, the DNS server is configured with this own address as preferred DNS with three DNS forwarders 1) VDSL Router 2) ISP DNS1 3) ISP DNS2
    Currently only one Network card is active for problem determination reasons.
    There appears to be no consensus concerning IPV6 enabled or disabled, I tried both with no apparent effect
    I have set all network cards server and client to Full Duplex and the same speed, also disabled Offload functions within the adapter settings. Some but no consistent improvements.
    Best Practice Analyzer Results
    DNS server scavening not enabled
    Root hint server XYZ must respond to NS queries for the root zone
    More than one forwarding server should be configured (although 3 are configured)
    NIC1 should be configured to use both a preferred and alternate DNS (there is only one DNS in this network)
    I have found some instructions to apply changes to the clients through a host file but I would rather like to understand whether this DNS response time issue can be resolved on the server for example timing setting perhaps. Currently the DNS forwarders are
    set to 3 second.
    Since a few people have reported issues with DNS but most are working with multi DNS, DC environment I could not really apply any suggestions made there. perhaps there is anyone like me who is running a single server who has overcome or experience the same
    issues. Any help would be appreciated

    Hello Milos thx for your reply.. my comments below
    1. What does it "switched"? You may mean migration or new installation. We do not know...
    >> Switched is probably the incorrect term, replaced would be the appropriate wording. Before, there was a HP Proliant Server with SBS 2008 with distinct domain and now there is a Dell Server with MS 2012 R2 with a distinct domain. Client were
    removed from one (SBS) domain and added to the new Server 2012 domain. Other components did not change for example same Network Switch or VDSL Router, Workstations and Printer
    2. Two DCs are better alternative. Or backup very frequently. There are two groups of administrators. Those who have lost DC and those who will experience this disaster in near future.
    >> Correct, and I am aware of that
    3. NIC settings in W 7 and W 8.1, namely DNS points to DC (...and NOTHING else. No public IP or that of router DNS.))
    >> Correct, this is how it's currently implemented. Clients point to DC for DHCP and DNS and Default Router, no public IP or DNS. The only references to ISP DNS exist on the VDSL Router itself as provided through ISP when establishing VDSL
    Link and the list of Forwarders in the DNS Server configuration. However, I have just recently added the ISPs DNS as forwarders for test purposes and will probably learn tomorrow morning whether this had any effect for better or worse.
    4. Do nslookup to RR on clients. RR branch is saying client basic info on LDAP parameters of AD.
    >> Will post as soon as available
    5. I do not use forwarders and the system works
    >> Ok, does this mean it works for you in a similar or the same infrastructure setup or are you saying it is not required at all and I can remove any forwarder in a scenario like mine? If not required can you explain a bit more why it is not
    required apart from that it does work for you that way?
    6. DHCP should sit on DC (DHCP on router is disabled)
    >> Correct, no other device is configured to provide DHCP service other than DC and DHCP is currently running on DC
    7. NIC settings in DC points to itself (loopback address 127.0.0.1)
    >> Are you sure this is still correct and does apply to Server 2012? I am reading articles stating that it should be the servers own IP but local loop or should this be added as alternate DNS in addition to the servers own IP?
    8. Use IPCONFIG /FLUSHDNS whenever you change DNS settings.
    >> OK, that was not done every time I changed some settings but I can do that next week. Reboot alone would not suffice, correct?
    9. Test your system with dcdiag.
    >> See result below
    10. Share your findings.
    Regards
    Milos
    Directory Server Diagnosis
    Performing initial setup:
       Trying to find home server...
      Home Server = GSERVER2
       * Identified AD Forest.
       Done gathering initial info.
    Doing initial required tests
    Testing server: Default-First-Site-Name\GSERVER2
          Starting test: Connectivity
             ......................... GSERVER2 passed test Connectivity
    Doing primary tests
       Testing server: Default-First-Site-Name\GSERVER2
          Starting test: Advertising
             ......................... GSERVER2 passed test Advertising
          Starting test: FrsEvent
             ......................... GSERVER2 passed test FrsEvent
          Starting test: DFSREvent
             ......................... GSERVER2 passed test DFSREvent
          Starting test: SysVolCheck
             ......................... GSERVER2 passed test SysVolCheck
          Starting test: KccEvent
             ......................... GSERVER2 passed test KccEvent
          Starting test: KnowsOfRoleHolders
             ......................... GSERVER2 passed test
             KnowsOfRoleHolders
          Starting test: MachineAccount
             ......................... GSERVER2 passed test MachineAccount
          Starting test: NCSecDesc
             ......................... GSERVER2 passed test NCSecDesc
          Starting test: NetLogons
             ......................... GSERVER2 passed test NetLogons
          Starting test: ObjectsReplicated
             ......................... GSERVER2 passed test
             ObjectsReplicated
          Starting test: Replications
             ......................... GSERVER2 passed test Replications
          Starting test: RidManager
             ......................... GSERVER2 passed test RidManager
          Starting test: Services
             ......................... GSERVER2 passed test Services
          Starting test: SystemLog
             ......................... GSERVER2 passed test SystemLog
          Starting test: VerifyReferences
             ......................... GSERVER2 passed test VerifyReferences  
       Running partition tests on : ForestDnsZones
          Starting test: CheckSDRefDom
             ......................... ForestDnsZones passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... ForestDnsZones passed test
             CrossRefValidation
       Running partition tests on : DomainDnsZones
          Starting test: CheckSDRefDom
             ......................... DomainDnsZones passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... DomainDnsZones passed test
             CrossRefValidation
       Running partition tests on : Schema
          Starting test: CheckSDRefDom
             ......................... Schema passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... Schema passed test CrossRefValidation
       Running partition tests on : Configuration
          Starting test: CheckSDRefDom
             ......................... Configuration passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... Configuration passed test CrossRefValidation
       Running partition tests on : GS2
          Starting test: CheckSDRefDom
             ......................... GS2 passed test CheckSDRefDom
          Starting test: CrossRefValidation
             ......................... GS2 passed test CrossRefValidation  
       Running enterprise tests on : GS2.intra
          Starting test: LocatorCheck
             ......................... GS2.intra passed test LocatorCheck
          Starting test: Intersite
             ......................... GS2.intra passed test Intersite
    Server:  gserver2.g2.intra
    Address:  192.168.240.6
    *** gserver2.g2.intra can't find g2: Non-existent domain
    > gserver2
    Server:  gserver2.g2.intra
    Address:  192.168.240.6
    g2.intra
            primary name server = gserver2.g2.intra
            responsible mail addr = hostmaster.g2.intra
            serial  = 443
            refresh = 900 (15 mins)
            retry   = 600 (10 mins)
            expire  = 86400 (1 day)
            default TTL = 3600 (1 hour)
    > wikipedia.org
    Server:  gserver2.g2.intra
    Address:  192.168.240.6
    Non-authoritative answer:
    wikipedia.org   MX preference = 10, mail exchanger = polonium.wikimedia.org
    wikipedia.org   MX preference = 50, mail exchanger = lead.wikimedia.org
    polonium.wikimedia.org  internet address = 208.80.154.90
    polonium.wikimedia.org  AAAA IPv6 address = 2620:0:861:3:208:80:154:90
    lead.wikimedia.org      internet address = 208.80.154.89
    lead.wikimedia.org      AAAA IPv6 address = 2620:0:861:3:208:80:154:89
    Final benchmark results, sorted by nameserver performance:
     (average cached name retrieval speed, fastest to slowest)
      192.168.240.  6 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      + Cached Name   | 0,001 | 0,002 | 0,003 | 0,001 | 100,0 |
      + Uncached Name | 0,027 | 0,076 | 0,298 | 0,069 | 100,0 |
      + DotCom Lookup | 0,041 | 0,048 | 0,079 | 0,009 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 gserver2.g2.intra
                    Local Network Nameserver
      195.186.  4.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,023 | 0,025 | 0,000 | 100,0 |
      - Uncached Name | 0,025 | 0,071 | 0,274 | 0,065 | 100,0 |
      - DotCom Lookup | 0,039 | 0,040 | 0,043 | 0,001 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns8.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
      195.186.  1.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,023 | 0,026 | 0,001 | 100,0 |
      - Uncached Name | 0,025 | 0,072 | 0,299 | 0,066 | 100,0 |
      - DotCom Lookup | 0,039 | 0,042 | 0,049 | 0,003 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns7.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
        8.  8.  8.  8 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,033 | 0,040 | 0,079 | 0,011 | 100,0 |
      - Uncached Name | 0,042 | 0,113 | 0,482 | 0,097 | 100,0 |
      - DotCom Lookup | 0,049 | 0,079 | 0,192 | 0,039 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 google-public-dns-a.google.com
                     GOOGLE - Google Inc.,US
      UTC: 2014-11-03, from 14:33:12 to 14:33:29, for 00:17,648
    15: 40
    192.168.240.  6 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      + Cached Name   | 0,001 | 0,002 | 0,004 | 0,000 | 100,0 |
      + Uncached Name | 0,025 | 0,074 | 0,266 | 0,063 | 100,0 |
      + DotCom Lookup | 0,042 | 0,048 | 0,075 | 0,007 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 gserver2.g2.intra
                    Local Network Nameserver
      195.186.  1.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,024 | 0,029 | 0,001 | 100,0 |
      - Uncached Name | 0,024 | 0,073 | 0,289 | 0,067 | 100,0 |
      - DotCom Lookup | 0,039 | 0,041 | 0,043 | 0,001 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns7.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
      195.186.  4.162 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,022 | 0,024 | 0,029 | 0,001 | 100,0 |
      - Uncached Name | 0,025 | 0,073 | 0,286 | 0,065 | 100,0 |
      - DotCom Lookup | 0,041 | 0,066 | 0,180 | 0,037 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                         cns8.bluewin.ch
               BLUEWIN-AS Swisscom (Schweiz) AG,CH
        8.  8.  8.  8 |  Min  |  Avg  |  Max  |Std.Dev|Reliab%|
      ----------------+-------+-------+-------+-------+-------+
      - Cached Name   | 0,033 | 0,038 | 0,077 | 0,009 | 100,0 |
      - Uncached Name | 0,042 | 0,105 | 0,398 | 0,091 | 100,0 |
      - DotCom Lookup | 0,049 | 0,066 | 0,141 | 0,025 | 100,0 |
      ---<-------->---+-------+-------+-------+-------+-------+
                 google-public-dns-a.google.com
                     GOOGLE - Google Inc.,US
      UTC: 2014-11-03, from 14:39:59 to 14:40:12, for 00:13,363

  • Eventlog 1030 group policy update error on Windows 2012 member server

    group policy update is failing with event ID 1030
    Computer policy is getting applied but User policy Failes. Other windows 2012 servers are successfully updating.
    gpupdate /force
    Updating policy...
    Computer Policy update has completed successfully.
    User Policy could not be updated successfully. The following errors were encount
    ered:
    The processing of Group Policy failed. Windows attempted to retrieve new Group P
    olicy settings for this user or computer. Look in the details tab for error code
    and description. Windows will automatically retry this operation at the next re
    fresh cycle. Computers joined to the domain must have proper name resolution and
    network connectivity to a domain controller for discovery of new Group Policy o
    bjects and settings. An event will be logged when Group Policy is successful.
    To diagnose the failure, review the event log or run GPRESULT /H GPReport.html f
    rom the command line to access information about Group Policy results.

    Hi,
    Before going further, I assume that the user account we were using is a domain account. As a result, we can use this account to log onto other domain computers to see if its
    user policy settings can be updated successfully.
    Besides, for troubleshooting this issue, we can try to retrieve Gpsvc.log to check this issue.
    Regarding how to enable logging in the Gpsvc.log file, the following blog can be referred to for more information.
    How to enable GPO logging on windows 7 /2008 r2 ?
    http://blogs.technet.com/b/csstwplatform/archive/2010/11/09/how-to-enable-gpo-logging-on-windows-7-2008-r2.aspx
    Best regards,
    Frank Shen

  • How to force retention policy in Office365 for a mailbox

    Looking to run the MRM retention policy for a E3 mailbox and or Tenant.   I have an old PST file (2011 and older) that I have attached to their active Office365 mailbox Inbox Subfolder and have a policy in MRM to send the online Archive.  
    I know the MRM policy works because it has placed items in the "Online Archive" for the inbox and it's sub folders.
    The questions is how often does this MRM policy run on it's own?   Daily, hourly, weekly.
    How do I force the policy to take effect immediately?
    This is what I believe will do this via powershell:
    Set-executionpolicy remotesigned -force
    Set-executionpolicy unrestricted -force
    $LiveCred = Get-Credential
    Connect-msolservice -credential $LiveCred
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUrl
    https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection Import-PSSession $Session
      Set-Mailbox “mailbox name” -RetentionPolicy “Archive Policy”
     Start-ManagedFolderAssistant -Identity “mailbox name”

    Hi,
    In Exchange 2013, the Managed Folder Assistant is a throttle-based assistant.
    Throttle-based assistants are always running and don't need to be scheduled. The system resources they can consume are throttled. You can configure the Managed Folder Assistant to process all mailboxes on a Mailbox server within a certain period (known as
    a work cycle).
    You can use the following command to check work cycle.
    Get-MailboxServer –Identity ExServer | Format-List *WorkCycle*
    If you want to force the policy to take effect immediately, you can use the Start-ManagedFolderAssistant cmdlet.
    Here is an article for your reference, this article also applies to Exchange online.
    http://technet.microsoft.com/en-GB/library/dd297955(v=exchg.150).aspx
    Best regards,
    <o:p></o:p>
    Belinda Ma
    TechNet Community Support

  • How can we do policy updations and insertion using procedures in insurence?

    how can we do policy updations and insertion using procedures in insurence?
    please answer for this post i need faced in interview.how can we write the code for that procedure in policy details using procedures in plsql.

    997995 wrote:
    how can we do policy updations and insertion using procedures in insurence?
    please answer for this post i need faced in interview.how can we write the code for that procedure in policy details using procedures in plsql.You are asking about a specific business area (Insurance) and the nuances of that business (Insurance Policies) and providing no technical details about what is required, on a technical forum. There are many varied businesses in the world and not everyone here is going to be familiar with the area of business you are referring to.
    As a technical forum, people are here to assist with technical issues, not to try and help you answer questions in an interview for something you clearly know nothing about, so that you can get a job that you won't know how to do.
    If you have a specific technical issue, post appropriate details, including database version, table structures and indexes, example data and expected output etc. as detailed in the FAQ: {message:id=9360002}

  • Windows 8.1 - How to enable "Require additional authentication at startup" for bitlocker using powershell script?

    I need help to do this using powershell scripts on Windows 8.1?
    OS : Windows 8.1 Enterprise
    TPM Chip : None
    Enabling bitlocker on OS drive with a password at boot time is a 2 step process.
    1) Edit the Group Policy (gpedit.msc) - Administrative Templates -> Windows Components -> BitLocker Drive Encryption -> Operating System Drives ->
    Require additional authentication at startup -> Allow bitlocker without a compatible TPM
    ref : http://www.7tutorials.com/how-enable-bitlocker-without-tpm-chip-windows-7-windows-8
    2) Enable Bitlocker on c driver using manage bitlocker snapin
    I need help to do this using powershell scripts?
    I researched on the forums but ran into an issue.
    I found that Group policy commandlets can be used to do step 1.  
    I am getting the error : "ins have been registered for Windows PowerShell version 4" when I try to do the following in windows 8.1
    Add-PSSnapin GroupPolicy
    Import-Module GroupPolicy -Verbose

    Hi TinkerBotFoo,
    I’m writing to just check in to see if the suggestions were helpful. If you need further help,
    please feel free to reply this post directly so we will be notified to follow it up.
    If you have any feedback on our support, please click here.
    Best Regards
    Anna
    TechNet Community Support
    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.

  • How to set volume using Powershell script?

    I would like to know on how to set volume under Window 7 Home 64 bits system using Powershell script.
    Such as 8000 levels as default
    Does anyone have any suggestions?
    Thanks in advance for any suggestions
    Thanks in advance for any suggestions

    Try this.
    Function Set-SpeakerVolume{
    Param (
    [switch]$min,
    [switch]$max,
    [int]$Percent
    $wshShell = new-object -com wscript.shell
    If ($min){
    1..50 | % {$wshShell.SendKeys([char]174)}
    ElseIf ($max){
    1..50 | % {$wshShell.SendKeys([char]175)}
    elseif($Percent){
    1..50 | % {$wshShell.SendKeys([char]174)}
    1..($Percent/2) |% {$wshShell.SendKeys([char]175)}
    Else{
    $wshShell.SendKeys([char]173)
    This works in Windows 8.1.
    Stolen / Modified from
    http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/28/weekend-scripter-cheesy-script-to-set-speaker-volume.aspx, which took me 20 seconds of (apparently) lucky searching.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • I need to know how I can disable the automatic updates of Firefox, since I work in a company that is requiring this. Ideally, by group policy or some means to disable all network computers

    I need to know how I can disable the automatic updates of Firefox, since I work in a company that is requiring this.
    Ideally, by group policy or some means to disable all network computers

    Some info here (group policy) --> http://www.unidesk.com/blog/how-disable-firefox-auto-updates<br />
    Above article refers to --> http://sourceforge.net/projects/firefoxadm/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How to Force enable, silent updates for Adobe flash in windows 8

    How to Force enable updates, silently for Adobe flash in windows 8 using group policy?
    I have followed this Article:
    http://helpx.adobe.com/flash-player/kb/administration-configure-auto-update-notification.h tml
    http://gpyall.com/archives/disable-adobe-flash-updates-on-64-bit-windows-with-group-policy /
    This looks promising but not working.
    Also, I cannot even manually create a file, in Win 8  (C:\Windows\SysWOW64\Macromed\Flash)
    So how would group policy can put mms.cfg in this location with following vaule:
    AutoUpdateDisable=0
    SilentAutoUpdateEnable=1
    Thanks in Advance.

    You will find more information in http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flas h_player_11_7_admin_guide.pdf

  • How to access group policy in windows 8 home premium, not 8.1 to disable snipping tool

    how do I access group policy to disable the snipping tool in windows 8 home premium? client has not installed update 8.1. client is trying to save pictures to pictures album, but it also saves a screenshot to the documents folder as well regardless
    of what save method is used.
    thanks.

    You can disable the Snipping Tool by creating the below registry setting
    (save as a .REG file)
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Policies\Microsoft\TabletPC]
    "DisableSnippingTool"=dword:00000001
    ref: http://gpsearch.azurewebsites.net/Default.aspx?PolicyID=2426
    I am not aware of any Snipping Tool feature which automatically saves the snip, as a file.
    (there are other utilities available which can perform similar functions)
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)
    This has apparently resolved the problem with the saving of screenshots based on the customers response. thanks so much.

  • [CS3 JS] How to force XMP metadata update for a thumbnail?

    Hi Folks,
    In a JavaScript in Bridge CS3, I'm updating a value in the XMP metadata for a Thumbnail. Later in the script I want to read the updated XMP metadata information from the Thumbnail, but often Bridge hasn't updated the metadata by the time I read it. In other words, my script reads the value prior to the update. I'm guessing there's a caching issue going on.
    I'm new to Bridge scripting, and I am hoping someone here can offer suggestions on how I can (or, even *if* I can) force Bridge to update the XMP metadata cache for a file so that when I read it later in the script it will reflect the recent changes. I've tried using Thumbnail.refresh(), but that doesn't seem to do the trick. I don't mind a slower script, I just want to be able to read the correct value.
    Thanks in advance for any help!
    -- Jim

    Hi David,
    I'm running this script on a MacBook Pro, 2.5GHz, 4GB RAM.
    Here is a sample JSX that shows the issue I'm having:
    #target "bridge-2.0"
    main();
    function main() {
        if( xmpLib == undefined ) {
            var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
            var libfile = new File( pathToLib );
            var xmpLib = new ExternalObject("lib:" + pathToLib );
        var myValue = "Headline Test";
        var myFilePath = "~/Desktop/TestFile.tif";
        var curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
        XMPWriteHeadline(myFilePath, myValue);
        // *** I would like to refresh the cache here ***
        curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
    function XMPGetHeadline(theFilePath) {
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        return myHeadlineXMPProp;
    function XMPWriteHeadline(theFilePath, theTextStr){
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myOrigHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Headline");
        xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", theTextStr, 0, XMPConst.STRING);
        var updatedPacket = xmp.serialize
            (XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
    To run this script, in main(), set the myFilePath variable to the path of a file that has an "IPTC Code" "Headline" property.
    This script, when run, sets the "Headline" property value to the value of myValue. After runing the script for the first time, take a look at the console log. You should see that Headline value displayed does not change between the two console entries. My log looks like this after the first run:
      Headline value: "undefined"
      Headline value: "undefined"
    The thing is, the second entry in the console listing, above, was created after the Headline value was set by XMPWriteHeadline(). The two values should be different between the two console entries.
    If you run the script a second time against the same file, you will see that the Headline value does contain the value that was written in the first run of the script--it just took some time to update the cache, I'm guessing. Here's the second run's log:
      Headline value: "Headline Test"
       Headline value: "Headline Test"
    So, what I'm looking for is a way to insert code (where the comment line "//*** I would like to refresh the cache here ***" appears), to force Bridge CS3 to refresh its cache so that when I call XMPGetHeadline() after calling XMPWriteHeadline(), the Headline value will return the value that was just written.
    I hope this is clear enough...
    Thanks!!!!
    -- Jim

  • How to configure group policy for emet via a command line

    I have been tasked with installing emet on 50 servers that I only have access to with our patching server (so I can't remote in and open the gpedit gui). I can get it to install, but now the problem that I'm facing is I need to enable 6 of the group policies
    for emet. Is there a way to do this while installing it? or a way to do it after the install?

    cmd line you need to deal with is in the C:\Program Files (x86)\EMET 4.1 folder
    specifically emet_conf --refresh would tell the systems to pull in the settings from a GPO they have already applied.
    In a non - SCCM environment I would probably recommend using group policy preferences and create a task scheduler item on your servers that runs emet_conf --import
    \\fileserver\settingsfile.xml on some sort of automated basis. Then you can just configure a client like you need and run the emet_conf --export
    \\fileserver\settingsfile.xml whenever you need to change a mitigation etc and the clients will pick up on the change on their next run of the task scheduler item.
    In general installing on servers isn't a great idea and is not the intended use case for emet however if you are DoD/Gov then DISA has mandated it so won't argue there.  There's also the people that still have Internet access from servers so then it
    would make sense in that environment as well.
    CSS Security Support Engineer (FCS/MBSA/WUA/Incident Response/FOPE) Check out my blog http://blogs.technet.com/kfalde or better yet check out http://technet.com/wiki and start contributing :)

  • How to force LR to update previews in bulk

    hi all,
    is there a method or setting to force LR4 to update the prewies in "bulk", means outside of the grid too?
    problem is that when applying development changes on image sequences with hundreds of images, or even a smaller bunch of images LR4 only shows the applied changes in the current grid view.
    for updating the previews one has to go back and forth in preview by hand. this seems a bit stone age and can take a while.
    this was never a problem in bridge, which - although it took its time to create ALL previews - afterwards allowed for quick scrolling trough images with all previews generated. this was especially good for watching stop-motion movies and applying xmp RAW development changes.
    for LR4 RC3, this would be a nice option to have... classic, like it is now, and a "force update previews outside grid view" with a true progress indicator / counter, like with bridge.
    an example where we started using lightroom during production and ran exactly into the problem of slow / missing preview updates after applying batch XMP / development changes can be seen here (about 32000 raw files processed, 7500 used for the film)
    http://www.astronomerswithoutborders.org/news/1066-astronomers-paradise-is-a-journey-for-e veryone.html
    or here on NAT GEO
    http://newswatch.nationalgeographic.com/2012/02/21/new-time-lapse-gives-rare-glimpse-at-at acamas-starry-nights/
    any info or idea would be appreciated. systems used are current Macs with OSX 10.6.8 and Lion 10.4.7.
    thanks
    chris

    hi dorin,
    I don't have that. but I found:
    lightroom>preferences>file handling>import DNG creation>JPG preview - none, medium, full size (with "embed fast load data", "embed original raw file")
    lightroom>preferences>catalog setting> standard preview size/preview quality/automatically discard 1:1 previews...
    also "camera raw cache settings" could be interesting? in preferences>file handling
    cheers
    c

  • How to give readonly Permission rights to 1000 users with button using powershell script?

    $site = Get-SPSite
    -Identity "http://mysite/"
    $user = Get-SPUser
    -Identity "mydomain\myuser"
    -Web $site.RootWeb
    $assignment = New-Object
    Microsoft.SharePoint.SPRoleAssignment($user)
    $role = $site.RootWeb.RoleDefinitions[[Microsoft.SharePoint.SPRoleType]::Reader]
    $assignment.RoleDefinitionBindings.Add($role);
    foreach ($web in $site.AllWebs)
        if ($web.HasUniquePerm)
            $web.RoleAssignments.Add($assignment)
    With above script I can give Readonly permission to the users...but at a time I can give permission to only one user...Actually 1000 users requires these permissionMy requirement is I will have a textbox and a button.I will enter username in textbox
    and when i clicked button the required permission should be assigned to the user given in the textbox...can you please tell how can i achieve this........how make to run powershell script when button is clicked.

    Hello,
    Instead of applying security to user level, it'll be better to create a SharePoint group where you will add the users. and use the outof the box interface to give permissions.
    and for your button, just add the direct link to add user
    http://serverurl/_layouts/15/aclinv.aspx?GroupId=7&IsDlg=1 
    replacing the group ID by the id of your new group (you can see it in the url when your are in the group)
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.
    Why mark as answer?

  • How to set Current quota template dropdownto 50 GB using powershell script

    In central administrator under Application Management -> Configure quotas and locks  we have Current quota template drop down. I  want to set drop down value to 50 GB using powershell . Is it possible and it if it possible then How ? Please
    let me know 
    Thanks in Advance 
    Regards
    Subhash
     

    Hi Sub_84,
    A quota template consists of storage limit values that specify the maximum amount of data that can be stored in a site collection. When the storage limit is reached, a quota template can also trigger an e-mail alert to the site
    collection administrator. You can create a quota template that can be applied to any site collection in the farm. The storage limit applies to the sum of the content sizes for the top-level site and all subsites within the site collection.
    You can create quota template using powershell, ojbect module and sharepoint UI.
    Create new Quota template using powershell:
    $newQuotaTemplate = New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate
    $newQuotaTemplate.Name = "New Quota Template"
    $newQuotaTemplate.StorageMaximumLevel = (150 * 1024) * 1024
    $newQuotaTemplate.StorageWarningLevel = (100 * 1024) * 1024
    $newQuotaTemplate.UserCodeMaximumLevel = 300
    $newQuotaTemplate.UserCodeWarningLevel = 300
    $contentService =[Microsoft.SharePoint.Administration.SPWebService]::ContentService
    $contentService.QuotaTemplates.Add($newQuotaTemplate)
    $contentService.Update()
    Check the link which can guide you how
    http://www.c-sharpcorner.com/uploadfile/anavijai/quota-templates-in-sharepoint-2010/
    Please mark the Answer and vote me if you think that above solution can help you to resolve the issue

Maybe you are looking for

  • What type of Vista for Qosmia G30-194

    What type of Vista you advise to by installed on a G30-194: x86 or x64, because both works with this type of processor

  • Been having iTunes problems for months - now it won't work at all

    Hi there, For the last few months, iTunes has been failing to update (halfway through download it throws up an error saying the update failed. Trying to update manually threw up the errors I've linked to below). So I decided to try to fix it at last,

  • How do i add windows to my macbook pro

    I just bought windows 8.1 software and i was wondering how to install it onto my macbook pro? I was told a program called parralels or fusion could do it but i could not find them. How do i install windows and still have OS X available?

  • Photoshop CS2 and Windows 7

    I have Photoshop CS2 and recently acquired Windows 7.  I want to bring images in directly to Photoshop but the images go through Photo Gallery in Windows.  I can import them into PS, but i want them to come into PS directly.  Also I cannot include im

  • Source files missing after wsus install

    2 days ago I decided to install WSUS and SUP on our SCCM 2012 server and all was going good until this am when I discovered the folder that I keep all of my software deployment  in under the sourcefiles share was empty. I did take a snapshot of the s