Is update not approved for a specific group via powershell.

My apologies in advance for asking a similar question to the one I asked two months ago,
is update approved for specific group via powershell? I thought I had this covered, but as I've found time to continue to work on this project I see that it does not.
I have a script that iterates through updates and if the release date is older than 30 days and they have not already been “Approved for Install” or “Approved for Removal” for a specific group it approves them. I am currently faced with the dilemma that
when an update is set to “Not Approved” for the specific group I’m working on it does not come across in my group’s approvals and there for I cannot detect its current state to know if I should approve it. In other words, I don’t want to approve an update
that I set to not approved for a specific group.
I am currently achieving all this so far by connecting to my WSUS server and getting any and all updates via $all = $wsus.GetUpdates(). I Then get my group’s approved updates via $groupApproved = $wsus.GetUpdateApprovals($GroupScope) where ApprovedStates
= "Any" and ApprovedComputerTargetGroups.Add($current_wsus_group). While iterating through $all I grab updates that are older than 30 days and check to see if the updateID exists in my $groupApproved. If it does not, I approve the update. Like I
said before, an explicitly unapproved update for my group does not show up in my $groupApproved. I understand it’s because of my GetUpdateApprovals($GroupScope) being just that and only getting approved for install or uninstall, but even when I try to simply
GetUpdates($GroupScope) I am still not returned explicitly unapproved updates. Below is a screen shot of what I mean by explicitly setting an update to unapproved for a group. I’ve read up on
ApprovedStates and possible enumerated values and it does include "NotApproved" defined as "Includes updates that have not been approved or declined.".
Hope all that makes sense, thanks for the help.

So, I've decided to go about this a different way. Rather than getting all updates and comparing them to approvals via a scope of updates for my specific group (which includes all actions but Not Approved), I am going to look at specific approvals for each
update and see if there is a match for my group. A simplfied version of this is below. 
$AnyAllUpdates = $wsus.GetUpdates()
foreach ($udpate in $AnyAllUpdates)
if ($update IsNOTDeclined IsNOTSuperseded LegacyNameNOTIA64 CreationDateLTDATE yada yada yada)
# get the approvals for this udpate as they relate to my group
$uApprovals = $update.GetUpdateApprovals() | ?{$_.ComputerTargetGroupId -eq $wsus_group.Id}
if ($uApprovals)
if ($uApprovals.action -eq "Install")
# do nothing, the udpate was approved for install
elseif ($uApprovals.action -eq "Uninstall")
# do nothing, the update was approved for uninstall
elseif ($uApprovals.action -eq "NotApproved")
# do nothing, the udpate was not approved for install
else
# since there was no specific action then it must be an inherited not approved from teh parent group
# approve the update!

Similar Messages

  • Is update approved for specific group via powershell?

    Hello, 
    I have a script that auto approves updates based on release date for specific groups. The script checks to see if the update has already been approved (e.g. isApproved) and either skips it if it's already been approved or approves it for my specific group
    (e.g. $update.approve("install",$wsus_group)). The problem I'm running into is if I approve Update1 for GroupA, then later check Update1's isApproved to see whether or not I need to approve it for GroupB, Update1's isApproved is $true and therefor
    my script skips approving it for GroupB. I've checked the update's object and I don't see a multi-valued var for groups that its been approved for. I've started to poke around with other
    Microsoft.UpdateServices.Administration namespaces but I don't see one that has the info I'm looking for. 
    So, how can I view what updates have been approved for GroupA vs GroupB?
    Thanks! 

    Hi Joey,
    If you want to approve updates to multiple groups, and also want to check if the updates have been approved to the groups, please check the script below:
    This can examine one computerGroup and find updates not approved for one or multiple other computer groups.
    $serverName="localhost"
    $targetComputerGroup="BaselineGroup"
    $checkForMissing="MissingGroup1,MissingGroup2"
    [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
    $wsus=[Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($serverName,$false)
    $computerGroup=$wsus.GetComputerTargetGroups()|ForEach-Object -Process {if ($_.Name -eq $targetComputerGroup) {$_}}
    $UpdateScope=New-Object Microsoft.UpdateServices.Administration.UpdateScope
    $UpdateScope.ApprovedStates="Any"
    $updateScope.ApprovedComputerTargetGroups.Add($computerGroup)
    $Approvals = $wsus.GetUpdateApprovals($UpdateScope)
    #At this point we have all of the updates assigned to the $targetComputerGroup
    $report= @()
    write-host "Querying for all Updates approved for $targetComputerGroup"
    foreach ($Approval in $approvals) {
    $record=""|Select-Object ComputerGroup,UpdateName, UpdateID
    $record.ComputerGroup=$wsus.GetComputerTargetGroup($Approval.ComputerTargetGroupID).Name
    $record.UpdateName=$wsus.GetUpdate($Approval.UpdateID).Title
    $record.UpdateID=$wsus.GetUpdate($Approval.UpdateID).ID.UpdateID
    $report +=$record
    #Now group the results by UpdateName
    $GR=$report|group -Property UpdateName
    $CheckForMissing=$CheckForMissing.Split(",")
    foreach ($entry in $gr) {
    $groups=@()
    foreach ($g in $entry.Group) {
    $groups += $g.ComputerGroup
    foreach ($missing in $checkForMissing) {
    if ($groups -Contains $missing) {}
    else{
    New-Object PSObject -Property @{
    Name = $entry.Name
    UpdateID = $entry.Group[0].UpdateID
    GroupMissing = $missing
    Reference from:
    WSUS report approvals for a group
    I hope this helps.

  • Why Lumia710 is "update not available" for "Taiwan...

    I bought Lumia710 in Taiwan, I think Nokia also sold many 710 for Taiwan people.
    But why Lumia710 is update not available for Taiwan users ?
    We also need new features and further enhancements to the Nokia Lumia710 in Taiwan.
    We waiting for
    Latest Windows Phone operating system (Note. This is not WP 7.8 yet.)
    Internet sharing (Wi-Fi Hotspot) — Share your phone's internet connection over Wi-Fi with up to five other devices or computers.
    Flip to silence — Silence incoming calls by turning your phone face down.
    Fix to prevent the volume of the ringtone temporarily increasing (Lumia 800 specific)
    Download new apps from Marketplace, such as camera extras, including smart group shot and self-timer, Contacts share, and Play To, a DLNA app for showing your content wirelessly.
    Usability and performance improvements.
    Additionally Camera Extras (incl. smart group shots, panorama, action shots, etc.) will be available from the Marketplace plus other new imaging apps (like Citylens).
    But just only Taiwan's Lumia710 users got update not available in Asia pacific.
    It is mean : Latest version of software update will not be launched for this product code and/or country.
    So anybody can answer me ? Tell me why ? Why without Taiwan users ?
    Best Regards,
    Kevin
    Attachments:
    Lumia 710 update not available.jpg ‏172 KB

    Dear Kevinluh, Welcome to the Nokia Forums!
    I understand your frustration, however update availability can vary depending on Region and carrier, this is because some regions and carriers may not have signed off the update or have policies preventing the update occuring.
    We hope you understand, please get in touch with your local Nokia Care line for more information regarding the update.
    Regards
    Sheldrick
    Press the 'Accept As Solution' icon if I have solved your problem, Kudos my post if my advice has helped you!

  • Still blutooth update not available for 7.8 u said...

    update not available for 7.8 u said couple of days
    Pls gv specific date

    Apparently the Bluetooth Share app has re-appeared in the Nokia collection in the Marketplace for some regions over the last week or so. If you still do not have the update in a week's time, then I suggest that you contact your local Nokia Care for clarity on the matter, or source the QR codes to download the app directly: http://nokia.com/support

  • I cannot update iPhoto as I receive a message saying update not available for this Apple ID as either it was bought by a different user or was cancelled

    I have inherited my daughters Macbook Air and am trying to update i photo. The message I receive is - update not available for this Apple ID either because it was bought by another user or item was refunded or cancelled.
    I have tried her ID which was still unsuccessful.
    I cannot access my photos at all. Can anyone help?

    Hi Queenstown2014,
    Sign onto her Apple/iTunes ID in the iTunes Store. Then click on the iTunes ID and then on Account in the dropdown. Once you have her account screen displaying, scroll to the bottom and click on RESET next to the line "Reset All Warnings for Buying and Downloading", then try again (with her iTunes ID still signed on).
    Cheers,
    GB

  • Upgraded to Yosemite,  Created new apple ID as couldn't remember last one now can't update iPhoto receive message this update not available for this apple Id either because it was bought by a different user or item refunded or cancelled.

    upgraded to Yosemite and now can't update Iphoto or Imovies receiving message this update not available for this apple ID because it was bought by a different user or item refunded or cancelled.  Is there an easy fix

    Unfortunately, anything obtained at the app store remains tied to the Apple ID used to obtain it forever. You will either have to start over with your new ID or try to recover the original ID.
    Frequently asked questions about Apple ID

  • Vacation rule   - Timesheet approval for a specific project

    Problem Description: Would like to know how to set the vacation rule for a specific project.
    My requirement is to create vacation rule for a timesheet approval for a specific project. I do see option in vacation rules but there is no option to select specific project.
    Can you please help me out on this?
    ======================================================
    Transfer notification ownership
    A manager may transfer a notification for a specific project to the new manager of that project.
    Regards
    Umeshwar Thakur
    91-9766616912

    Hi Dina, thx for your response
    I have error "Rejection Error : Auto Accouting Error"
    There is Output :
    Project Num Revenue(Credited) Customer Agreement Rejection Reason
    DP700150.01 1 NOKIA SI( 1058) PKS-01/NSN/09 AutoAccounting Error

  • Query Builder - Getting Universelist for one specific Group

    Hi All,
               I am in need of a query string (in query builder) that will return me All the universes for a specific group.Is it possible to do and if possible what will be the way to do this?
    Thanks in advance for your help,
    Anirban

    Hi Anirban,
    What is the BusinessObjects version you are using ( i.e. BO XIR2 or BOXI 3.0)?
    Regards,
    Deepti Bajpai

  • After downloading Yosemite iPhoto is blocked.  Update error message reads: Update not available for this ID either because it was bought by a different user...

    After downloading Yosemite iPhoto is blocked.  Directed to update.  Update error message: Update not available for this ID either because it was bought by a different user.....  This could be because my iPhone is now linked to the Mac and it is recognising that ID.

    My previous post should read...Could this be because my iPhone is now linked to the Mac and is recognising that ID?

  • Update not available for this Apple ID

    I keep getting this notification that the app 'Nyan Cat' needs to be updated, while I have never had or bought this app. When I try to update, I get 'Update not available for this Apple ID'. Is there anyway to remove this "update"?
    Thanks!

    Hi rafpbr!
    You may want to try to search your device for this app then delete it. You can use this article to utilize spotlight search and find the app:
    iOS: Understanding Spotlight Search
    http://support.apple.com/kb/ht3636
    Then you can use the information in this link to delete the app:
    Delete an app - App Store - iPhone Basics - Apple Support
    http://support.apple.com/kb/TI135
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Error : Wage Type is not allowed for personnel SG grouping for WT 3

    Hi All,
    When i am trying to create wage type Degree allowance i am getting error like below.
    WT xxxx is not allowed for personnel SG grouping for WT 3 (from 01.09.2006 to
    31.12.9999)
         Message no. PG 074
    Diagnosis
         In the "Personnel Subgroup Grouping for Primary Wage Types" view
         (V_001P_K), the employee is assigned to personnel SG for primary wage
         types 3. However, this grouping is not valid for wage type xxxx in the
         period from 01.09.2006 to 31.12.9999.
    Please let me know where i needs to check.
    Thanks.

    try to change the start date and try like 01.01.1990 like this
    juss chk and update

  • Why is the IOS 8 update not available for the Iphone 4?

    Why is the IOS 8 update not available for the Iphone 4? Will it ever be available? I cannont afford a new Iphone at this time so why am i being penalized for not having a new Iphone. Very upset

    Scottwick wrote:
    I think they want you to upgrade to the new Iphone  or get the Iphone c or s
    Well of course they would, but that's not why iPhone 4 can't have iOS8.  It is simply the fact iPhone 4 can't support the features of iOS8.  Le'ts be realistic in recognizing iPhone 4 is now over 4 years old.  In cell phone land, that is ancient........

  • Credit check and Credit hold not working for 2 specific clients

    Hello dear Oracle Support,
    I would like to ask for your help in the following subject:
    The Credit deppartment assign a Credit Hold and a Credit Check for 2 specific customers, but for some reason, these check boxes are not getting respected by the system, since the sales department are not getting any message or warning when creating an order. I tryed to look at these 2 check boxes at a table but I am affraid that I cant find the field, I am using the RA_CUSTOMERS table, but perhaps it is not the correct one, so I was wondering if you could give me any advice.
    Thanks

    Hi
    1. IMG -- SD -- Basic funtions -- credit management/risk mgmt -- credit mgmt -- Define credit groups.
    Here confirm that you have
    01 - credit group sales order
    02 - credit group delivery
    03 - credit group for GI
    2.  IMG -- SD -- Basic funtions -- credit management/risk mgmt -- credit mgmt -- Assign sales document type and delivery document type
    Here you have to assign
    01 - to the sales order(Ex OR) types
    02 - to delivery document type (Ex LF) <b>Dlv credit group</b>
    03 - to delivery document type (Ex LF) <b>GI credit group</b>
    <u><b>For delivery document type we have to assign to credit group one for Delivry another for PGI</b></u>
    3. IMG -- SD -- Basic funtions -- credit management/risk mgmt -- credit mgmt -- Define automatic credit control (OVA8)
    Maintain new combination for Your credit control area/risk categry of the customer/03 (GI credt group)
    Example : 1000/001/03
    maintain static/Dynamic credit check for this combination.
    Note : give warning at order level (credit grp 01) and delivery level (credit grp 02)... and give error at PGI level (credit grp 03).....
    So that you can see difference easyly
    4. FD32 - Maintain credit limit and Risk category(001) for your customer
    5. order - delivery - PGI
    Try this
    Hope your problem will be solved
    Let me know if you have any problem
    Reward points if helpfull
    Muthupandiyan

  • App'ing for Lowes UPDATE! APPROVED FOR $2K

    I will be doing an app for a Loews card today or tomorrow. My scores are low to mid 700's and my UTI is at 24% across all of my cards. Whatever they give me (if I'm approved), I will be calling the backdoor number and asking for $50k based on the information I saw here. Wish me luck.  BTW, my report will show that I recently bought a home reporting since March. I will tell them that I need major renovations to explain why I need that much.  Any tips would be appreciated.   UPDATE, -  after being approved for the $2k, I called the back door number and asked for $50k and was countered with $17k. 

    Yes-Its-Me wrote:
    I am going to be the bad guy here.. Looking at the limits on your card as I see your highest limit is on the NFCU card, you will get approved but you will not be getting a 50k lowes card. The credit line is determine by the limits on all cards, scores etc.. You have a very good reason as to why you want it so I will keep fingers crossed for you.  Report back with results..My highest card was a 17,500 NFCU card, and when I called them for a CLI, I was given $25k (from a $2,500 limit) when I asked for it, $7,500 more than NFCU. Now this was an established account, so it might differ from a new account, and $50k is quite high, but it's possible.

  • Output is not coming for a specific billing documnet no

    Hi,
      I am not able to get the out put of a smartform for a specific billing document number.For othe documents output is coming.
    For that specific billing document no ,the field are showing '#' mostly.Evenif i am not giving any conditions then also its showing
    #.Its not showing the output for the page no even.
    Can u please suggest something..
    Thanks.

    Try to debug the smartform.
    Put a break point in the smartform and then try to execute. check for the value. Check it out.

Maybe you are looking for

  • 24" Aluminum iMac Slow with Lion

    I have a 24" Aluminum iMac - 2.8Ghz, 6GB RAM, 500GB HD... its a Spring 2008 iMac... SL was getting slow and we upgraded to Lion. The becahball comes on very frequently and takes anywhere from a minute to <insert time> to go away... i repair my permis

  • App Store is missing from iOS 7

    iTunes, App Store, and camera are all missing from my newly updated ios7 iPad.

  • Can't get Windows 7 drivers for Satellite C50-A-1JQ

    I've been trying to install windows 7 on my C50-A-1JQ as many software packages I use at work will not work with windows 8. After managing to install windows 7 I have a list of uninstalled evices in my device manager. These include the Ethernet Contr

  • Export/Import DC project

    Hi, I am trying to export my WebDynpro project from the NWDS so that I can move it to a different PC. It was created as a DC project. When I export to the file system and import it on the new PC, the DC metadata node does not exist in the new environ

  • Order line invoiced even it has a fulfillment set value

    Hello all, I am facing this issue with some SO....my order lines are getting invoiced even it has the fulfillment set value...let me explain with an example: I have SO with 3 lines, which have the same fulfillment_set value, lets say letter "A" is th