RPC Error in ISE but not when I run manually in console

I'm having a very strange issue. I developed a function that invokes SCCM Machine policy refresh on a remote computer:
Function Refresh-SCCMMachinePolicy {
param($computer = $null)
$ms = new-object system.management.managementscope
$ms.path = “\\$computer\root\CCM”
$mc = New-Object System.Management.ManagementClass($ms , ‘sms_client’,$null)
$mc.invokeMethod(‘TriggerSchedule’,'{00000000-0000-0000-0000-000000000021}’)
Write-Host "Machine policy refreshed on $computer" -foregroundcolor yellow
I set the $computer to a machine name and run these line by line from the console and it works but if I try to run the following in ISE it gives me an RPC error...:
Import-Module 'smodule.psm1'
Import-Module 'ConfigurationManager.psd1'
$computers = get-cmcollectionmembership -CollectionName 'Test'
foreach ($computer in $computers)
Refresh-SCCMMachinePolicy -computer $computer
Remove-Module 'smodule'
Remove-Module 'ConfigurationManager'
I get this error:
The following exception occurred while retrieving member "invokeMethod": "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"
At smodule.psm1:74 char:5
+     $mc.invokeMethod(‘TriggerSchedule’,'{00000000-0000-0000-0000-000000000021}’)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemException
    + FullyQualifiedErrorId : CatchFromBaseGetMember
The function above is loaded from smodule.psm1 file.
I also have tried saving the ISE script above as a PS1 file and running it from the console but I get the same error. Both machines have executionPolicy set to bypass.
I have tried many different Firewall configurations to no avail as well. Not sure it would be a firewall issue anyway as it works from the console... Am I missing something?
Thanks!
Tony

Oddly enough, now after I fixed the quotes, it gives me the error in the console too...
I know it was working before because I was watching the SCCM logs on the client and when I would run it, the appropriate logs would start updating...
Update: opened a console window with Admin credentials and it worked...
Yep, you'll need to run elevated.
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)

Similar Messages

  • Captivate 3 shows skin in preview but not when I run after published?

    Captivate 3 shows skin in preview but not when I run after published.  It shows it is included, what's up?

    Is the Skin externalised?  If so, perhaps Flash Global Security is interfering:
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/how-to-set-up-flash-global -security
    You could also try NOT externalising the skin.

  • Error with running a jar, but not when i run it in eclispe?

    I built this program which works without any errors in eclispe, it is within a package called com.dceg.rules..
    but when i packaged it into a jar, i get this error...
    java.lang.ClassNotFoundException: com.dceg.rules (file:\C:\Source\dom\Validator Package\Validator.jar!\com\dceg\rules
    ) does not appear to be a valid package
    What can be wrong?
    Here is the manifest file
    Manifest-Version: 1.0
    Class-Path: jargs.jar log4j-1.2.13.jar dnsjava-2.0.2.jar com/dceg/rule
    s/
    Created-By: 1.5.0_06 (Sun Microsystems Inc.)
    Main-Class: com.dceg.rules.Validator
    Here is where the errors comes up from..
    public void getClasses(String pckgname) throws ClassNotFoundException {
    // This will hold a list of directories matching the pckgname. There may be more than one if a package is split over multiple jars/paths
    ArrayList<File> directories = new ArrayList<File>();
    try {
    ClassLoader cld = Thread.currentThread().getContextClassLoader();
    if (cld == null) {
    logger.error(new ClassNotFoundException("Can't get class loader."));
    String path = pckgname.replace('.', '/');
    // Ask for all resources for the path
    Enumeration<URL> resources = cld.getResources(path);
    //System.out.println("r: "+resources.nextElement());
    while (resources.hasMoreElements()) {
    directories.add(new File(URLDecoder.decode(resources.nextElement().getPath(), "UTF-8")));
    } catch (NullPointerException x) {
    logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Null pointer exception)"));
    } catch (UnsupportedEncodingException encex) {
    logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Unsupported encoding)"));
    } catch (IOException ioex) {
    logger.error(new ClassNotFoundException("IOException was thrown when trying to get all resources for " + pckgname));
    // For every directory identified capture all the .class files
    for (File directory : directories) {
    if (directory.exists()) {
    // Get the list of the files contained in the package
    String[] files = directory.list();
    for (String file : files) {
    // we are only interested in .class files
    if (file.endsWith(".class")) {
    // removes the .class extension
    classes.put( file.substring(0, file.length() - 6) , (pckgname + '.' + file.substring(0, file.length() - 6)) );
    } else {
    **********throw new ClassNotFoundException(pckgname + " (" + directory.getPath() + ") does not appear to be a valid package");******* <-- error here
    Message was edited by:
    hamham3001

    Heres the code again.. looks better now
    public void getClasses(String pckgname) throws ClassNotFoundException {
            // This will hold a list of directories matching the pckgname. There may be more than one if a package is split over multiple jars/paths
              ArrayList<File> directories = new ArrayList<File>();
            try {
                ClassLoader cld = Thread.currentThread().getContextClassLoader();
                if (cld == null) {
                     logger.error(new ClassNotFoundException("Can't get class loader."));
                String path = pckgname.replace('.', '/');
                // Ask for all resources for the path
                Enumeration<URL> resources = cld.getResources(path);
                //System.out.println("r: "+resources.nextElement());
                while (resources.hasMoreElements()) {
                    directories.add(new File(URLDecoder.decode(resources.nextElement().getPath(), "UTF-8")));
            } catch (NullPointerException x) {
                 logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Null pointer exception)"));
            } catch (UnsupportedEncodingException encex) {
                 logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Unsupported encoding)"));
            } catch (IOException ioex) {
                 logger.error(new ClassNotFoundException("IOException was thrown when trying to get all resources for " + pckgname));
            // For every directory identified capture all the .class files
            for (File directory : directories) {
                if (directory.exists()) {
                    // Get the list of the files contained in the package
                    String[] files = directory.list();
                    for (String file : files) {
                        // we are only interested in .class files
                        if (file.endsWith(".class")) {
                            // removes the .class extension
                            classes.put( file.substring(0, file.length() - 6) , (pckgname + '.' + file.substring(0, file.length() - 6)) );
                } else {
                    throw new ClassNotFoundException(pckgname + " (" + directory.getPath() + ") does not appear to be a valid package");
        }

  • I have several ipod nanos. i can sync one, but since i connected the ipad 2 I am getting an error on two of them, it says cannot sync, error 13019. the loaded songs show on the computer (on the ipods), but not when the ipod is plugged off the usb

    i have several ipod nanos. i can sync one, but since i connected the ipad 2 I am getting an error on two of them, it says cannot sync, error 13019. the loaded songs show on the computer (on the ipods), but not when the ipod is plugged off the usb. Any answers? please

    You can sync your iPod with multiple computers, but what can be synced is very limited.  See this article for more details.
    http://support.apple.com/kb/ht1202
    B-rock

  • SpryHiddenRegion error in IE7 but not FireFox

    Here is a copy of the code and the errors I get. Does anyone
    have any ideas why this would happen in IE only?
    <div spry:region='dsPages' class="SpryHiddenRegion"
    style="height:350px; overflow:auto;">
    <div spry:state='loading'>Loading data...</div>
    <div spry:state='error'>Failed to load
    data.</div>
    <table spry:state='ready' class="mylist">
    <tr id="top">
    <th onClick="dsPages.sort('id');">ID</th>
    <th onClick="dsPages.sort('name');">NAME</th>
    </tr>
    <tbody spry:repeatchildren='dsPages'
    spry:choose="choose">
    <tr spry:when="{id} == selectedID"
    class="SelectedLastClass" id="{ds_RowID}"
    onClick="dsPages.setCurrentRow('{ds_RowID}');pagesSelect({id});"
    spry:hover='HoverClass' spry:select='SelectedClass'>
    <td>{id}  </td>
    <td>{name}  </td>
    </tr>
    <tr spry:default="default" id="{ds_RowID}"
    onClick="dsPages.setCurrentRow('{ds_RowID}');pagesSelect({id});"
    spry:hover='HoverClass' spry:select='SelectedClass'>
    <td>{id}  </td>
    <td>{name}  </td>
    </tr>
    </tbody>
    </table>
    </div>
    ERROR:
    expected ':'
    and
    Spry.Data.updateRegion(spryregion1) caught an exception:
    [object Error]
    Thanks for your help.
    Jim

    i have reduced the code to the following:
    <script type="text/javascript">
    dsPages = new
    Spry.Data.XMLDataSet('views/pages/getdata_pages.cfm',
    '/dataset/row', {useCache: false});
    </script>
    <div spry:region='dsPages' class="SpryHiddenRegion"
    style="height:350px; overflow:auto;">
    <div spry:state='loading'>Loading data...</div>
    <div spry:state='error'>Failed to load
    data.</div>
    <table spry:state='ready' class="mylist">
    </table>
    </div>
    and i get the following error in IE but not FireFox:
    Spry.Data.updateRegion(spryregion1) caught an exception:
    [object Error]

  • Podcast - works on iTunes page but not when subscribed

    Hi, I produced my podcast, submitted the feed through iTunes store and was validated. However, it happens so that people can listen to the podcast on iTunes page but not when they subscribe to it and try to download. error points to URL issues apparently. Help.

    It works perfectly well for me. On subscribing I saw all three episodes and downloaded and played Episode 2 without any problems. The only explanations I can suggest are that either some of your subscribers are having some sort of technical issue at their end: or that your server is intermittently sulking and failing to respond to requests. Try playing the episode from this link a few times on spaced-out occasions and see whether you ever get a failure:
    http://thecricketcouch.com/CouchTalk/CouchTalk-AntSims-SanaKazmi-062611.mp3

  • Jar runs from Dos prompt, but not when double clicked.

    Hello everyone,
    My executable jar file will run fine when called from the Dos prompt like so: java -jar myJarFile.jar
    But not when I double click it. I've associated *.jar files with java.exe as suggested here on the forums but all that happens when I double click the jar file is that I get an instance of the Dos prompt that flashes up on the screen and closes immediately. Any help or suggestions would be appreciated, thank you.
    This short tutorial I found earlier may be of help to somebody.
    http://www.cs.princeton.edu/introcs/85application/jar/jar.html

    Yes Carmello, I had associated jar files via folder options in windows explorer with java.exe, now when I have the jars associated with javaw.exe as in the following:
    ACTION:
    javaw.exe -jar "%1"
    APPLICATION USED TO PERFORM ACTION:
    javaw.exe "%1"
    I get an error dialog with the title string "Java Virtual Machine Launcher" and the error message itself is "Could not find the main class. Program will exit." when I double click on the jar file. As I said in my first post the application [GUI based with around ten different forms] runs fine when called from the Dos prompt. Any idea as to what is wrong? Thanks for replying by the way.

  • Load swf works in Publish Preview but not when published

    Hi Folks,
    I having a problem where im trying to load two 1mb SWF movies into my Flash piece. It works fine in Publish Preview but not when I finally publish. I get this error in IE:
    SecurityError: Error #2000: No active security context.
    I have googled around and there is some talk online of a hack where by you get a timeout to overcome this. However im not so technical do I dont really know how to do this to my code in AS3. My code at the moment is below.
    Any help would be much appreciated and rewarded with Karma
    movieClip_12.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_9);
    var fl_Loader_9:Loader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_9:Boolean = true;
    function fl_ClickToLoadUnloadSWF_9(event:MouseEvent):void
    if(fl_ToLoad_9)
      fl_Loader_9 = new Loader();
      fl_Loader_9.load(new URLRequest("search.swf"));
      addChild(fl_Loader_9);
    else
      fl_Loader_9.unload();
      removeChild(fl_Loader_9);
      fl_Loader_9 = null;
    // Toggle whether you want to load or unload the SWF
    fl_ToLoad_9 = !fl_ToLoad_9;
    movieClip_14.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_10);
    var fl_Loader_10:Loader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_10:Boolean = true;
    function fl_ClickToLoadUnloadSWF_10(event:MouseEvent):void
    if(fl_ToLoad_10)
      fl_Loader_10 = new Loader();
    fl_Loader_10.load(new URLRequest("refunds.swf"));
      addChild(fl_Loader_10);
    else
      fl_Loader_10.unload();
      removeChild(fl_Loader_10);
      fl_Loader_10 = null;
    // Toggle whether you want to load or unload the SWF
    fl_ToLoad_10 = !fl_ToLoad_10;

    I think this is either a problem with my site preLoader or my external .swf Loader. I was checking out the bandwith profiler and saw something weird and I wondered if anyone could explain...I've added a picture. I have a blank frame on only my actions layer to export classes to and it seems that frame 2 is "bleeding" into frame 1. Could this be my problem? Why would this happen? Thanks

  • Firefox throws "This Connection is Untrusted" when using hostname, but not when using IP address

    I am remotely accessing a website which has iFrame in it. The website uses https, but iFrame tag has "src" pointing to a site using http only. However, when I remotely go to the site, iFrame shows the message below although the ''src" url is http only (there is no SSL certificate) when I use IP address (https://10.10.101.156:8006/apprecovery/admin/Core/Storage) in address bar instead of hostname (https://hostname:8006/apprecovery/admin):
    ===
    This Connection is Untrusted
    You have asked Firefox to connect
    securely to d37t50w1, but we can't confirm that your connection is secure.
    Normally, when you try to connect securely,
    sites will present trusted identification to prove that you are
    going to the right place. However, this site's identity can't be verified.
    What Should I Do?
    If you usually connect to
    this site without problems, this error could mean that someone is
    trying to impersonate the site, and you shouldn't continue.
    d37t50w1 uses an invalid security certificate.
    The certificate is not trusted because it is self-signed.
    (Error code: sec_error_ca_cert_invalid)
    ===
    Why is it giving this when using hostname but not when IP address is using?

    Corrected first para above:
    I am remotely accessing a website which has iFrame in it. The website uses https, but iFrame tag has "src" pointing to a site using http only. However, when I remotely go to the site, iFrame shows the message below although the "src" url is http only (there is no SSL certificate) when I use hostname address (https://<hostname>:8006/apprecovery/admin) in address bar. But I dont see the message in iFrame when I instead use IP Address (https://<IP Address>:8006/apprecovery/admin) to go to main website.

  • HP D110 AIO printer. Prints jam when printing with wireless, but not when hooked to USB cable! HELP!

    I have a HP D110. It jams the paper when I print with wireless, but not when I use USB cable. Any ideas?

    From what you describe you are having issues printing from MS Office. Have you had trouble printing from other resources on your computer (e.g. from the internet or another program)? The first thing I am going to suggest is that we start by uninstalling and reinstalling the printer from the resources available online. 
    First if you use a USB cord, make sure to remove it (this is important). Do not plug it back in until the software directs you to. Then go through the Devices and Printers, Programs and Features and Device Manager folders and insure that all copies, files, and programs related to the printer are removed. Then as directed, restart the computer. 
    In the START menu type "%temp%" and press ENTER. Here I want you to press Ctrl+A and hit DELETE. Some of the files will not allow you to delete them, skip those files and delete the majority that allows it. 
    http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3562006&lang=en&cc=us...
    Install that and let me know the result! 
    Have a great day!

  • My ipod has had a previous owner How do I change my ipods email address so that when I try to down load anything it asks for the previous owners password but when I go to my account it says its my email my account but not when I try to download????

    My ipod has had a previous owner How do I change my ipods email address so that when I try to down load anything it asks for the previous owners password but when I go to my account it says its my email my account but not when I try to download can anyone please help me ????Plus it still has some of the previous owners pictures and videos on it that I want to delete and can't????? Also is there a way to kill the apps that u have used throughout the day the battery doesn't last long at all ??????

    - How did you dlete stuff from the iPod? If you have a 1G or 2G iPod and deleted the stuff by going to Settings>Genera.>Reset>Erase aall contents and settings without being connected to a power source, the battery dies before he erase was comleted since it can take hour.
    - In any event try the following:
    - Connect to a chaging sour for three hours.
    - Reset the iPod and then connect to the computer and try to restore va iTunes.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Next try placing the iPod in recovery moe and then try to restore. For recovery mode:
    iPhone and iPod touch: Unable to update or restore
    - Last try DFU made and restore.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • Wifi works at home but not when away from home

    My Wifi works at home but not when away from home, what is wrong?  I thought with a phone plan I didn't need to have a wifi connection.

    You either need WiFi or Cellular (or both). If you have neither, you can't connect to the internet.
    Most people use WiFi at home and Cellular while away from home, or connect to public WiFi networks where there are some.

  • My iPad only has sound when the earphones are plugged in. The switch that controls the volume works then, but not when I take the earphones out. Suggestions?

    My iPad2 only has sound when the earphones are plugged in. The volume switch works then too, but not when I take the earphones out. Suggestions?

    it's a hardware issue
    https://discussions.apple.com/thread/1343532?start=315&tstart=0
    more here
    iphone stuck in headset mode

  • Sound through hdmi to my tv works but not when watching video online like 4OD

    the sound through hdmi to my tv works with music and videos I have downloaded, but not when watching video online like 4OD and youtube.
    How can I get it to work?

    Ok so I happened to figure it out while on the phone to apple support. Even though the guy was very nice, I think I knew more than him! He was explaining very basic resolution principles I played about. I had the second option in displays resolution. All I did was unplug the HDMI cable, click on 'best for display' then plugged the HDMI in and my resolution on the normal monitor changed to the normal blue, then went black momentarily and then changed to a strange resolution but another window appeared that said SONY BRAVIA HDMI at the top! Hey presto! Don't know why it didn't do it yesterday - I probably left the HDMI cable in or something! Oh well. Problem solved!

  • I would like to create a playlist of some of my voicememos to hear on my iphone5. I have no problem creating the list and can listen on playlist on computer but not when i sync to my phone. How can I listen to voicememos in a playlist on my iPhone?

    I would like to create a playlist of some of my voicememos to hear on my iphone5. I have no problem creating the list and can listen on playlist on computer but not when i sync to my phone. How can I listen to voicememos in a playlist on my iPhone?

    Hi czigrand,
    Thanks for visiting Apple Support Communities.
    Currently, you can gift dollar amounts or individual items (EG. songs) on the iTunes Store. See this article for more information:
    In the iTunes Store, you can gift a dollar amount or specific music, movies, TV shows, or apps from your iPhone, iPod touch, iPad, Mac, or PC. Follow these steps to send a gift from the iTunes Store.
    iTunes: Sending iTunes Gifts
    http://support.apple.com/kb/HT2736
    Best Regards,
    Jeremy

Maybe you are looking for

  • How to create a dynamic action from link column in classic report

    I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event. I was thinking I could create a dynamic action with selection type=jquery selecto

  • File Adapter Write Compilation problem JDev 11.1.1.6 and BPEL 2.0

    Hi, Im creating a simple BPEL Project with a One-way Process template project. I have added just one Partnerlink with a File Adapter to do a write operation. I have assigned the main process input to the file Write Invoke operation. But I am getting

  • Solution: Active Directory over LDAP over SSL

    Hey all I have the solution and i will describe how i solved it. - Install windows 2000 server - install service pack 2 - install high encription pack from windows http://www.microsoft.com/windows2000/downloads/recommended/encryption/ - install activ

  • S16 24fps - DVCPro HD 25 fps -   24 fps editing and output?

    I'm new on this forum so "hi everybody!" We're about to shoot a short feature on S16 film and I'm in charge of postproduction. Last feature we made was shot on S16@24 fps -> HDCam SR telecine -> Betacam SP -> 24fps edit on Avid Film Composer -> EDL -

  • Illustrator Bonding Box or Free Transform Encounter-Unknown Error PARM

    Hi, I'm working in CS5 illustrtor on a Mac the error message I keep getting when trying to scale a Bounding box is "Bounding Box or Free Transform encountered an unknown error:" PARM Please help! I really don't know what to do. I saw some replys on t