What is the proper powershell to disable a connector?

I've got an open ticket with Microsoft and I might need to disable all of my Exchange Connectors in a hurry (I have 46 of them)?
I've tried these.  They executed without an error but the connector remained enabled.
Get-SCSMConnector -DisplayName "ConnectorName" | %{ $_.Enabled = 0 } | Update-SCSMConnector
Get-SCSMConnector -DisplayName "ConnectorName" | %{ $_.Enabled = 1 } | Update-SCSMConnector
Get-SCSMConnector -DisplayName "ConnectorName" | %{ $_.Enabled = "False" } | Update-SCSMConnector

This should work. Had some problem myself but found this page and modified the code:
http://blog.scsmsolutions.com/2012/03/update-ad-and-sccm-connector-scheduler-with-powershell/ 
Just change ZGC in the -eq Displayname so it will match your connectors and you can easy disable all connectors.
$SMDIR = (Get-ItemProperty "hklm:\SOFTWARE\Microsoft\System Center\2010\Service Manager\Setup\").InstallDirectory
$SMSDKDIR = "${SMDIR}\SDK Binaries"
$SMDLL = "${SMSDKDIR}\Microsoft.EnterpriseManagement.Core.dll"
$SMADDDLL = "${SMSDKDIR}\Microsoft.EnterpriseManagement.ServiceManager.dll"
[reflection.assembly]::LoadFile($SMDLL) | out-null
[reflection.assembly]::LoadFile($SMADDDLL) | out-null
$ServiceManagementGroup = new-object Microsoft.EnterpriseManagement.ServiceManagementGroup "localhost"
# Get All connectors with displayname ZGC
$connectors = $ServiceManagementGroup.ConnectorFramework.GetConnectors() | ? {$_.DisplayName -eq "ZGC"}
foreach($connector in $connectors)
write-host "Disabling connector: $connector.DisplayName"
$connector.ConnectorObject.Item($null,"Enabled").Value = $true
$connector.ConnectorObject.Commit()
$ServiceManagementGroup.LinkingFramework.UpdateDataSource($connector.ConnectorObject.Id)
www.zgc.se - Sysadmin blog.

Similar Messages

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • What is the proper way to record line numbers in Master/Detail records?

    Guys and Gals,
    Been thinking about this for awhile, but thought it best to ask the people who really know what they are doing.
    What is the proper way to record & show line numbers in a Master / Detail record set?
    For example, take Master/Detail relationship Orders and OrderItems. Orders has a column Document_Number and OrderItems has Document_Number, Line_Number. Line_Number should contain the row number 1,2,3,4 ... etc. for each row in a document.
    Should I ...
    <ol><li>Add a sequence and a trigger in the database? The FusionOrderDemo does this, but then the sequence never "resets" and I've got row numbers that keep incrementing. So one document has rows 4,5,6 and the next document has 7,8,9 when they should both have 1,2,3.</li>
    <li>Programmatically take care of the row numbers? This seems like I'm asking for trouble. Anytime an insert or delete operation gets done, I'll have to iterate through rows and re-assign row numbers.</li>
    <li>Is there a way to assign row numbers in a table iterator (or data collection?) to an entity?</li></ol>
    Any suggestions would be appreciated. It's looking like #2 is my only option, but if anyone knows different I'd love the input.
    Will

    Thank you both guys.
    As John said, I believe I'm looking for a gap-free sequence per master record.
    The line number of the OrderItems table is the second half of the primary key. The first half of the primary key (DocumentNumber) is the foreign key to the Orders table.
    Think of it like line items on an order or invoice. For example, if you were talking to someone on the phone concerning an invoice, you might say, "The pricing for line item #3 is incorrect." In this case, it's good to have a common reference. Or imagine a Microsoft Excel spreadsheet with no row numbers displayed! You'd never get anywhere if you had to explain something over the phone.
    If this is tricky to perform, I take it using a sequence and trigger such as the Fusion Order Demo is the best way to approach the challenge for simplicity's sake?
    Will

  • Need to convert mini dvi to s video to run a school's Hatiachi ceiling mount projector. What is the proper adapter?

    Need to convert mini dvi to s video to run a school's Hatiachi ceiling mount projector. What is the proper adapter?

    Check the projector and see what kind of input is has, most have a VGA connector, so you would need a male to male VGA. You will also need the Mac mini dvi to male VGA (of course).
    Some of the older projetors have a component in only, which is the red,yellow,green, RCA connectors, which are avaialable. (Usually the are fairy short, 5 ft or so,  so you would need to get a VGA with yhe mini DVI to VGA, and a component (the one with the 3 RCA's) you will probaly have to get a Female to Female VGA adapter to connect te VGA to the component.
    And finaally if that weren't enough, the really old projectors have only a composite input. All I can say about that is "the hunt is on"
    Best of luck

  • What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?

    I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
    alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
    Thanks in advance. Been struggleing with this for days!

    When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
    Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
    There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
    However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
    Hope this helps.
    Marcos Kirsch
    Principal Software Engineer
    Core Modular Instruments Software
    National Instruments

  • What's the proper protocol for a reset on my ipod touch 4g?  iOS 6 has totally jacked it up and it will no longer do anything but crash, and won't sync with itunes wirelessly or by cable.

    What's the proper protocol for a reset on my ipod touch 4g?  iOS 6 has totally jacked it up and it will no longer do anything but crash, and won't sync with itunes wirelessly or by cable.
    It's a 64G ipod touch and was fine till Apple told me to upgrade to ios 6.  Now most of my apps crash, my music won't play and I just get a white screen when I hit Music.
    When I try to sync to itunes it acts like it's going to sync and appears to recognize the ipod, but it's grayed out and has an update circle by it that spins for a while until itunes eventually freezes alltogether.  Is there a  way to go back to ios 5 after a erase and reset?

    iOS: Unable to update or restore

  • What Is The Proper J2EE Architect For This National Defense Project?

    A brief description of a national defense project I am looking into is that the system being developed is supposed to verify the "smartcard" of the card holder and his/her fingerprints against the Defense Department database. The system also reads in information about people (facial features, height, weight, etc.) and stores the information in the database, and then issues new "smartcard".
    1. People involved in the project already decided to use swing for the client tier.
    2. The problem is the Defense Department database. It is a flat file database and this database cannot be touched. It is a black box for Java developers. The Defense Department may provide a jar as an outer layer of this database.
    Question 1: Is the web tier essential for this defense project?
    Question 2: What is the proper J2EE architect for this project?
    Question 3: How to deal with the data problem? Especially it looks that entity beans are not applicable.
    Question 4: How does the system handle very heavy load? It is possible that tens of thousands of people will use the system at the same time.

    A brief description of a national defense project I am
    looking into is that the system being developed is
    supposed to verify the "smartcard" of the card holder
    and his/her fingerprints against the Defense
    Department database. The system also reads in
    information about people (facial features, height,
    weight, etc.) and stores the information in the
    database, and then issues new "smartcard".
    1. People involved in the project already decided to
    use swing for the client tier.
    2. The problem is the Defense Department database. It
    is a flat file database and this database cannot be
    touched. It is a black box for Java developers. The
    Defense Department may provide a jar as an outer layer
    of this database.
    Question 1: Is the web tier essential for this defense
    project?
    Question 2: What is the proper J2EE architect for this
    project?
    Question 3: How to deal with the data problem?
    Especially it looks that entity beans are not
    applicable.
    Question 4: How does the system handle very heavy
    load? It is possible that tens of thousands of people
    will use the system at the same time.
    Hi,
    You can get it done here :http://www.thesoftwareobjects.com

  • What is the proper procedure to backup to multiple external hard drives if one wishes to rotate drives such that you may store one in a fire safe?

    Description:  If I want to back up to two external hard drives using Time Machine, what is the proper procedure to follow such that I could keep one attached to Time Machine for daily backups, and one that I attach monthly such that I can back it up monthly, and then store it in a fire safe.  To do this, what are the exact steps to follow?
    Research in Progress:
    I selected the "?" icon in Time Machine which took me to "Mac Help - Time Machine Preferences" section.  I reviewed this section, including the "Select Backup Disk, Select Disk, Add or Remove Backup Disk."  It says, "If you haven’t set up Time Machine, click Select Backup Disk to set up a backup disk. Repeat the steps for each backup disk you want to set up."  I did add two backup disks.  It goes on to say "If you already set up Time Machine, your backup disks are listed, and information about each backup disk is shown. To select, add, or remove backup disks, click Select Disk or Add or Remove Backup Disk."  Well, what is lacking here is what happens when you "Remove" the backup disk.
    As I have read this section, it raises additional questions:
    What are some cautionary statements.
    What happens after you remove a backup disk?  Will Time Machine recognize it later?
    What is the proper procedure for removing and ejecting one of your external hard drive when you use it with Time Machine?  What happens if you don't "remove" a backup drive and instead just drag it to the "trash can, i.e. eject it" and later reconnect it.?

    Time Machine supports multiple backup drives including network area storage volumes (NAS) as well as physically-connected external backup drives.
    In , System Preferences, Time Machine, add the second drive by clicking Select Disk.
    All available connected drives including connected network drives are displayed.
    Select the additional drives, one at a time.
    Connected Network drives are displayed on the desktop only when actively being used by Time Machine for backup.
    When prompted, select 'use both' when adding the second drive.
    Then choose Select or Remove at the bottom of the list of available devices and network volumes to add additional drives.
    Time Machine then automatically rotates backups among the available designated devices and volumes.
    If the drive is physically not present, Time Machine skips to the next available backup drive.
    To DISMOUNT a drive to take it off-site, it is NOT necessary to remove it from the Time Machine preferences.
    When the drive is NOT in use, dismount it by Command+clicking that Drive icon on your desktop (or in Finder) and then "Eject".
    That's it.
    After 10 days with no backups to a given device, Time Machine does display a message and (as I recall) asks if you want to remove that drive from the rotation.
    You can never be too rich or have too many backups!

  • What is the proper way to charge battery in 2012 15 inch macbook pro.

    what is the proper way to charge the battery and make it last longest

    About Batteries in Modern Apple Laptops
    Battery University
    Apple - Batteries - Notebooks
    Apple - Batteries
    Extending the Life of Your Laptop Battery
    MacBook and MacBook Pro- Mac reduces processor speed when battery is removed while operating from an A-C adaptor
    Apple Portables- Calibrating your computer's battery for best performance
    Mac notebooks- Determining battery cycle count

  • What Are The Proper Settings In Audio/MIDI Setup?

    In the Audio Input, Line In, what is the proper setting for Hz? 44100, 48, 96, And should the 2ch be 16bit, 20bit or 24 bit? Right now I'm using an older gray iMic as the Audio in
    Thanks

    Steve B5 wrote:
    what is the proper setting for Hz?
    44100
    And should the 2ch be 16bit, 20bit or 24 bit?
    16 is standard, 24-bit (new to GB4) is the highest resolution

  • What is the proper and best way to destroy a java.util.List or Array for GC

    Hi,
    If I have a java.util.List of objects lets say:
    List<File> files = new ArrayList();The List contains 1000 file objects. When my class finishes, is it enough to do
    files = null;to make GC able to release it from memory?
    Cause it seems like I can't do the following:
    for(int i = 0; i < extracted_files.size(); i++){
                extracted_files.get(i) = null;
    }Or should I use this one:
    files.clear()What is the proper and best way to do this in order to avoid memory leaks? How about normal Arrays like File[]?
    Edited by: TolvanTolvanTolvan on 2009-sep-10 16:58

    TolvanTolvanTolvan wrote:
    Thanks for the info!
    But what if the List is a class variable running in a Web Service for like months without terminating?You mean if the List variable is a member variable of a long-lived object? Then presumably the list needs to live as long as the object does. In the unlikely scenario that the object needs to live on but its list member variable does not, then yes, setting the member to null will be needed to make the list eligible for GC. But I highly doubt this is your situation, and if it is, you probably have a design flaw.
    And if the list is referenced only by a local variable, then, as I already said, when the method ends, the variable goes out of scope, and the List is eligible for GC.
    Now, a slightly different situation is when the List needs to live a long time, and at some point during its life, you're done using some object that it refers to. In that situation, simply remove the element from the list (or set the element to null if it's an array rather than a list), and then if it's not referenced anywhere else, it can be GCed.
    How about Arrays like File[]? Do I need to iterate through the array and null all the objects or is it enough to just null the Array?YOU. DON'T. NEED. TO. HELP. GC. You don't need to set the elements to null, and you most likely don't even need to set the array variable to null.
    Also note that only references can be null, not objects.

  • Ownership/Group/Permissions What is the proper setting for free access?

    When we first get a customer supplied disk, it is copied to our G5. It looks like whomever is logged into the G5 and copies the disk becomes the owner of that folder and their permissions are applied to the enclosed copied files.
    We never know who will wind up working on these files and I want anyone to have free and open access to the files.
    So what it the proper choice under the ownership & permissions?
    My thinking would be:
    Owner = System
    Group = Everyone
    Access = Read & Write
    There are bunch of acromyms under these pulldown menus which mean nothing to me.

    Choosing 'everyone' and 'read & write' should work fine.
    You could change the owner to 'system', but there's no need.

  • What are the proper print settings to print two sides, landscape and bind on the short side?

    what are the proper print settings to print two sides, landscape and bind on the short side?

    This is a question best asked in the appropriate product forum.

  • What is the proper way to create a monotone image with real looking contrast?

    Once I apply a color to my previously created black and white image everything looks washed out.
    I have an artwork with 3D representation of the letterforms, casting shadows on the textured surface. Shadows are deep black. I need this artwork to be colored in gold. My client forwarded me the specs for the metallic gold which he got from the PANTONE. They are:Gold (871); Adobe 1998 RGB: 126-113-76
    HSB*: 44 degrees-40%-50%
    What is the proper way of applying those values to the desired image.
    My idea was to make the image black and white and than create a monotone image with the above specs. In this case the image gets washed out as the darkest black in the shadows becomes this Pantone gold. Is there any other way?

    A duotone will work, however you are going to want to work closely with your printer . Most printers will want the second color in CMYK (Possibly C60 M40 Y0 K100 instead of RGB values or specify a Pantone Rich Black (I personally like 6C)but it will cost you more for the wash up of both heads of the printer...
    Go to Image>Mode>Duotone (image must be greyscale first for this to work) then add the desired colors to your ink scales.

  • What is the proper way to include search terms in your page

    Say you have a web page that is about a certain topic and has information displayed on the page.  What is the proper way to include terms that you would like this page to show up on a search for but don't necessarily want to display on the page?
    I didn't know if including the search keywords at the bottom in small font with invisible color was the proper way.

    I didn't know if including the search keywords at the bottom in small font with invisible color was the proper way.
    ABSOLUTELY NOT!!!  This practice will get your site banned or blacklisted from Search Engines.  It is considered a Black Hat tactic to attempt to mislead search engine results in an effort to drive traffic to your site.
    Instead, use plenty of keyword rich, relevant text and good semantic mark-up (h1, h2, h3) inside the body of your pages.   In time, search engines will find you.
    Some Excellent Links on Search Engine Optimization:
    Google's SEO Starter Guide (PDF)
    http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf.
    Can Better Web Accessibility Mean Better Search  Ranking?
    http://alt-web.blogspot.com/2007/07/can-better-web-accessibility-mean.html
    High Rankings Advisor
    http://www.highrankings.com/newsletter/
    SEOMoz.org - Beginner's Guide to SEO (1-page  html)
    http://www.seomoz.org/article/beginners-1-page
    SEO Chat
    http://www.seochat.com/
    Submit Site Maps to 4 Major Search Engines
    http://alt-web.blogspot.com/2008/11/submit-sitemaps-to-4-major-search.html
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    www.twitter.com/altweb
    www.alt-web.blogspot.com/

Maybe you are looking for

  • How to Save the "Document Info" Details Action Via

    I saved the "Document Info" details in illustrator manually using "Document Info Pannel". Could you please expain how to save the "Document Info" details through illustrator action. Thanks, Prabudass

  • Bug in securing pdf report

    Security feature in exporting pdf report is not work. For example to add password to pdf report it will be done but when I try to open that pdf report is opened without asking for password!!

  • Layering Objects w/ Conditional Formatting

    I have a report w/ conditional formatting. In one instance, object a needs to display, and in another, object b needs to display; however, they both need to be in the same place in the layout. Every time I try to simply place one on top of the other,

  • In new upgrade is there a way to get pics back on caller id

    In the new upgrade is there a way to get pics back on the caller ID when people call you or when you call our rather than just a plain black screen?

  • Why can't I see the whole PSE organizer screen on iMac?

    PSE 12 was working fine until I tried changing the screen resolution....then I lost half the organiser. I've changed the resolution back...but I still can't see my complete organiser.  I can only see my last bottom 3 albums.  Despite uninstalling and