Lync Powershell help -getting error "Management Object Not found"

Hi,
I want to reference a list of users in Lync that do not have a HostedVoicemailPolicy applied. Please can someone help me..
I have a list of users that form a txt file I am referencing called $lynctest.
User1
User2
User3
NoSuchUser1
NoSuchUser2
I have the following and its not catching the error so that I can output to another file.
try
foreach($lyncuser in $lynctest)
    Get-CsUser -Identity $lyncuser | select displayname, hostedvoicemailpolicy
catch
   write-host "$lyncuser user not found" > "c:\datatemp\listofusers.txt"

Not super efficient, but quick and dirty.  If you're talking about thousands of users, this might be too slow and we can work something else out.  If you're talking about a handful, this might be fine.
foreach($lyncuser in $lynctest) {
$founduser=Get-CSUser|Where-Object {$_.samaccountname -match $lyncuser}
if ($founduser) {
"The user exists"
else {
"The user does not exist"
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
SWC Unified Communications
This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Similar Messages

  • [SOLVED]getting "error 15: file not found!"

    Hi all, I'm new to Arch and linux in general but i've managed so far and I'm really enjoying it.
    I'm dual booting Arch and Vista.
    Anyway, everything was working fine until I decided that I wanted to stop using GRUB as my bootloader and I used a program called EasyBCD and this guide http://apcmag.com/how_to_dualboot_vista … htm?page=4
    Now, I get "Error 15: File not found!" when i try to boot into arch. I've looked through countless other threads and google results with people with the same problem but none of the solutions in those threads helped me.
    here's my menu.lst
    # Config file for GRUB - The GNU GRand Unified Bootloader
    # /boot/grub/menu.lst
    # DEVICE NAME CONVERSIONS
    # Linux Grub
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,1)
    # /dev/sda3 (hd0,2)
    # FRAMEBUFFER RESOLUTION SETTINGS
    # +-------------------------------------------------+
    # | 640x480 800x600 1024x768 1280x1024
    # ----+--------------------------------------------
    # 256 | 0x301=769 0x303=771 0x305=773 0x307=775
    # 32K | 0x310=784 0x313=787 0x316=790 0x319=793
    # 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
    # 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
    # +-------------------------------------------------+
    # for more details and different resolutions see
    # http://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution
    # general configuration:
    timeout 3
    default 2
    color light-blue/black light-cyan/blue
    # boot sections follow
    # each is implicitly numbered from 0 in the order of appearance below
    # TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
    # (0) Arch Linux
    title Arch Linux
    root (hd0,2)
    kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/6e30f601-1196-41bf-b9f3-063434fa0c45 ro
    initrd /boot/kernel26.img
    # (1) Arch Linux
    title Arch Linux Fallback
    root (hd0,2)
    kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/6e30f601-1196-41bf-b9f3-063434fa0c45 ro
    initrd /boot/kernel26-fallback.img
    # (2) Windows
    title Windows
    rootnoverify (hd0,0)
    makeactive
    chainloader +1
    Last edited by tooeasyforkevin (2009-07-13 06:48:38)

    ok, try doing it the manual way by booting the cd as if you where to do an installation where it prompts you to log in as root.
    Once your logged in as root do
    grub
    and you will get the grub prompt
    grub>
    then the at the grub> prompt do
    grub> root (hd0,2)
    that tells grub it will find the boot files on the 3rd partition of the 1st hard drive. Then,
    grub> setup (hd0)
    to setup the grub bootloader on the MBR of the first hard drive.
    If all goes well you should see something like 'Checking if "/boot/grub/stage1" exists... yes '.
    grub> quit
    and reboot.

  • Error encountered while signing. Windows cryptographic service provider reported an error. Object not found. Error code:2148073489. Windows 7, Adobe Reader XI, Symantec PKI, Smart Card and CAC. I have seen other threads for this error but none have a reso

    Error encountered while signing. Windows cryptographic service provider reported an error. Object not found. Error code:2148073489. Windows 7, Adobe Reader XI, Symantec PKI, Smart Card and CAC. I have seen other threads for this error but none have a resolution. Any help would be appreciated.
    Sorry for the long title, first time poster here.

    This thread is pretty old, are you still having this issue?

  • Getting error "Http 404 not found" while accessing CUCM GUI..

    Hi,
    Please help um getting error "Http 404 not found" while accessing CUCM GUI. Yesterday it was running fine bt nw its showing dis error.
    Please find attached screenshot for ur referance.
    Thanks & R's
    Harish

    Hi Aaron,
    I have restarted dat service bt still the issue is persisting.
    Now its showing attached error.
    Thanks and R's
    Harish

  • I am having a terrible time trying to convert my Quick Time file to an AVI file to use in a powerpoint presentation.  Any suggestions?  I am getting Error .43 file not found?

    I am having a terrible time trying to convert my QT file to an AVI file so I can use in PowerPoint.  I am getting Error 43 File not Found, any suggestions?

    Hi Jenna,
    The error your getting suggests a file path problem.
    How are you embedding the movie in PP and where is the movie file located relative to the PP file? Are you getting this error within PP when the slide containing the embedded video is displayed?
    If you embed a movie and then move it or change its name then PP will generate this error.
    Alastair.

  • Calendar Server installation gets error "libnmspr20.dll not found"

    Calendar Server installation gets error "libnmspr20.dll not found"
    <P>
    When installing Calendar Server 3.5 on NT near the end an error
    occurs: "libnmspr20.dll not found " and then it will exit the setup
    without completion.
    This is a bug because it is looking for the libnmspr20.dll in the
    system path but the Calendar Server installation has left it in a
    temp directory. This does not occur if the Netscape Messaging Server
    has been previously installed on the same host. A workaround is, when
    the error message displays, you DON'T press ok, but search your
    computer for the missing file (usually found in temp-directory).
    You then copy the file to a directory in your system path. Now you
    can press the OK button and the installation will fail. Re-install
    the calendar server, this time the installation won't fail.

    Installing Latest JRE on NT4 sp6a produces the same error:
    InstallShield DLL Custom Action:
    File 'C:\TEMP\RegUtils.dll' can not be found. Make sure the file is on the target system or installed already.
    I searched www.installshield.com since the error is an installer error and the installer is InstallShield. NO results found there either.
    Seems like the installer team needs to brush up on the NT4 platform.

  • While Doing BW  Role Uploading Getting message "Linked Objects Not Found" ?

    Dear All,
    I am trying to upload a BW role from EP , while doing role upoad activity, when I am giving role name, system namein the first step it is identifying the role from the system.
    To that role four reports has been attached.
    After uploading the role, the role has been get uploaded, but the reports which are attached to the role it is showing that "Linked Objects Not Found", for all the reports.
    For all those reports I have checked the web url on BW server it is corect but then also I am getting above message.
    Please any one help me out in this scenario.
    Regards,
    Aditya

    The same problem during XI to BI integration as it was told in how-to.

  • When I Update My Nano, I get error message, "file not found"

    When I Update My Nano, I get an error message, "file not found, cannot update iPod". I have looked through the manual and tried reinstalling the iTunes program but it still won't update my iPod with music or pictures. PLease help.

    Try these basic troubleshooting steps one at a time.
    The Five Rs.

  • ERROR:NameNotFoundException: Object not found in lookup of MYDB

    NW 7.0 SP3
    I have defined a datasource MYDB by VA,and it tests OK.
    I wonder about how to use it in J2EE project or in WebDynpro Project.
    I created a J2EE project ,in the Web Model ,i new a class Test:
    public static Connection myconn(){    
         Context ctx = new InitialContext();
         Connection conn = null;
         DataSource dataSource = null;
         dataSource = (DataSource) ctx.lookup("MYDB");
        conn = dataSource.getConnection();
        return conn;
    then in webcontent ,I new a JSP page:
    <%
      Connection conn = com.Test.myconn();
    java.sql.Statement st = conn.createStatement();
    String str = "select * from TMP_NAME";
    ResultSet rs = st.executeQuery(str);
    rs.next();
    String str1 = rs.getString(1);
    %>
    after build and deploy the *.ear,the server returns an error:
             com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MYDB.
    Now I do not know anything else should I do,such as create a reference,and so on.
    Thanks for you all help!

    Hi,
    Try the code as below:
    DataSource ds = (DataSource) context.lookup("java:comp/env/jdbc/MYDB")
    Go through the below help link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/82/fdbf2085f65f43a71e755fc904478d/content.htm
    Go through the below thread for more info:
    Re: datasource using VA
    Regards,
    Charan

  • Have upgraded to 6.0.2 on my MacBook and get error message "Server Not Found" everytime i use Firefox; however, if i then click on my Gmail or other sites from bookmark toolbar it connects. means an extra step and that never happened before

    when i first click on Firefox the URL: www.27yhbnhy6tfgvrbcfre3.com shows up and the error message "Server not Found". but i can connect to any website by just clicking on a bookmark from the toolbar (or typing in a url). this never happened with previous versions of Firefox

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • I get error message, server not found every time I use Firefox browser

    Every time I open FireFox I get this message, server not found, can't find the server at www.s.com How do I get rid of that message? Thanks.

    See:
    *https://support.mozilla.com/kb/Server+not+found
    *https://support.mozilla.com/kb/Firewalls

  • Help re error message - file not found!

    I have recently transferred my library from my old PC to a new laptop.  This seemed to go ok and the files are showing up in my new library.  However I have just tried to add some files to my iPhone and I am now getting an error message when I try to upload them saying the files are not found. Help!

    Moving a library from machine to another can require some preparation if it is to go smoothly.
    If you still have access to a working library on the original computer I can help you do the transfer again. Alternatively, as long as the files are organized within a media folder in a way that is vaguley consistent with iTunes, i.e. folders for artists, with subfolders for albums, then my FindTracks script might be able to relink the files.
    tt2

  • Getting error : fileIOException: directory not found

    i m getting the error net.rim.device.api.io.file.FileIOException: directory not found whn i m saving any media files from watsapp or bbm, also my existing media folder got deleted automatically, so provide a resolution for the same. thnxs

    Hello jatin020 and welcome to the BlackBerry Support Community Forums.
    Sorry to hear you're experiencing an issue with your media.
    This error indicates an issue with your software and a reinstallation of the software will need to be done.
    Using BlackBerry Desktop Software, back up your data and follow the steps in KB11320 How to perform a clean reload of the BlackBerry Device Software for Windows (or if you use Mac see KB19915 Perform a clean reload of BlackBerry smartphone application software using BlackBerry Desktop Software on a Mac computer)
    After the reload is complete, try to save a media file. Are you now able to do so? 
    Thank You.
    -HMthePirate
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Constantly keep getting error 404, server not found

    Very frequently I keep getting the error message 404, server not found. This problem mainly comes up after I have been on the computer for a while, and I leave the web site that I'm viewing on for some time. I then return to the computer some time later, and when I try to refresh the page to update the info on the page (example: a weather site or yahoo stock market info) I keep getting, 404 server not found. When I try the option: try again, it does nothing to solve the constant problem. The only way I can get back to the web site and see updated info is to start firefox in safe mode. And, that does solve the problem. But why does this problem keep constantly occurring. And, why do I have to constantly have to restart firefox in safe mode to get going again. It would seem firefox should recognize this issue and solve it. I'm using what I believe to be the latest version, 15. Can someone shed some light on this issue? I did not have this problem with my older computer and an old version of firefox, version 3.6. But, since getting a new computer and using a new version of firefox, version 15, this problem constantly appears. Can some one help? Thank you.

    Which security software (firewall, anti-virus) do you have?
    A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    Do a malware check with some malware scanning programs on the Windows computer.<br />
    You need to scan with all programs because each program detects different malware.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender: Home Page:<br>http://www.microsoft.com/windows/products/winfamily/defender/default.mspx
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *http://support.kaspersky.com/viruses/solutions?qid=208280684
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Getting error 404 - file not found on ExportPDF site

    Hi - whenever I access ExportPDF site, I get an error 404 saying file not found....I am using IE 8.0.7601 version.  I can see the page from my mobile device but not from my desktop.  HELP!

    Hey Mike,
    Please ensure that you are signing up at: https://cloud.acrobat.com/exportpdf.
    Clear the cache of the browser and then try again.
    Have you tried using a different browser? What happens?
    Regards,
    Anubha

Maybe you are looking for