by comparing certain objects... helps with the formatting and variables

I want to delete computer accounts in an ORGANIZATIONAL unit that do not exist in a folder of vmware...

Step 1. Compare.

$ad = Get-QADComputer -SearchRoot 'domain.lan/Test-NoGPO'
$vmware= Get-VM -Location VDI_RemoteAccess
 
Write-Host "AD" $ad
Write-Host "VMWARE" $vmware
 
Compare-Object  $ad $vmware

Gives me this result:

AD DOMAIN\DSTASA1$ DOMAIN\SXCH100$ DOMAIN\SKFB111$ DOMAIN\FAKEPC$
VMWARE vstaq16 vstaq18

InputObject                                                               SideIndicator                                                           
-----------                                                               -------------                                                           
vstaq16                                                                   =>                                                                      
vstaq18                                                                   =>                                                                      
DOMAIN\DSTASA1$                                                          <=                                                                      
DOMAIN\SXCH100$                                                          <=                                                                      
DOMAIN\SKFB111$                                                          <=                                                                      
DOMAIN\FAKEPC$                                                           <=    

I need the output of 2 first orders are the same... preferably just the 'name' of the pc. On the subject line - compare I tried to use $ad. Name and $vmware. Name but that the errors and says that it is null when the script runs...

How to disinfect these lists and end up with a list of computers that are not in both places? (to later be deleted with other commands, not relevant here)

You were there at halfway when you tried with the Name property.

But you must keep all the computernames in 1 table and all VMnames in another table.

Then, you can compare the 2 tables.

Something like that

$ad = Get-QADComputer -SearchRoot 'domain.lan/Test-NoGPO' | %{$_.Name}$vmware= Get-VM -Location VDI_RemoteAccess | %{$_.Name}

Compare-Object $ad $vmware

Tags: VMware

Similar Questions

  • Need help with the formatting and reinstalling windows

    Hi, I have a Compaq Presario C700 p/n GR598EA #ABU I got to work about 3 years ago.

    Recently, it does not load windows, even in safe mode and I can't get back either.

    I used a disc to boot from linux to access and backup of all my important files and now I want to reformat the hard drive, resintall windows and start over (or try something else which will fix it)

    The laptop has been pre-installed with Windows Vista and HP stuff had already installed on it.  I don't have a Windows disc or discs of driver with the laptop.

    How can I format and reinstall windows and drivers, if I don't have records?

    Help, please.

    Thank you.

    Hello:

    You can order a Vista recovery disk set for your laptop if they are still available. See the instructions below:

    http://support.HP.com/US-en/document/c00810334=

    If you live not in the US or the Canada, you can contact HP Support worldwide for the country you live and ask recovery disks command to your laptop

    The link to the assistance of HP WW is below:

    http://welcome.HP.com/country/us/en/wwcontact_us.html

    Paul

  • How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    R,

    You can do this:

    (1) create the initial direct Type;

    (2) in the appearance palette dialog, click on add a new fill and define the color as you wish;

    (3) effect > convert to shape > Rectangle corners round/Rectangle/Ellipse and set parent > width/extra height as you wish (essentially what needs to be added to the size of the bounding box, if anything).

    After that you can change the Type and the filled area will fit as shown on the picture.

  • Helps with the rv180w and the Shrew soft vpn

    Hi, I'm trying to establish a vpn connection by using soft shrew for the cisco rv180w router.

    I watch and read everything I could find, but the connection drops during the opening of the tunnel.

    There were a few tuttorial here in the forum, but the links are down.

    I want Edifier is to establish communication and to be able to access my domain on the network.

    Any help with the settings would be greatly apeciated. I am new to vpn.

    Thanks in advance.

    Federico,

    Try to access the following link. It has good instructions for a similar model. The main difference is that the SA500 has double-WAN and the RV180W does not work.

    https://supportforums.Cisco.com/docs/doc-9378#comment-7216

    Here's another tutorial for the RVS4000 that can help:

    https://supportforums.Cisco.com/docs/doc-18443

    Check out the last post in the following thread, which received instructions for the RV220W (should be exactly the same as RV180W)

    https://supportforums.Cisco.com/message/4165652#4165652

    -Marty

  • Helps with the formatting on objects

    I have a script that I modified from a script of Alan Renouf (thanks for posting the script), but I'm having a problem with the output.

    The script gets a few details on a hard drive of virtual machines, and this is what is shown:

    VM: VM1

    Path              : {C:\, D:\}

    CapacityGB: {40: 40}

    FreespaceGB: {1: 18}

    Percent free: {2, 45}

    Low disk space on: C:\

    VM: VM2

    Path: {/, / boot, / usr, / home...}

    CapacityGB: {4, 1, 10, 2,...}

    FreespaceGB: {3, 1, 4, 0...}

    Percent free: {84, 95, 40, 17,...}

    Low disk space on: / home/brands

    The script is below, and it is the main problem.  I can show any data if I use - reach ',' on the parts that need it, but I have an if statement that will add another object to "Low disk space", then the drive letter.  I have this for disks that have less than 15 percent of available.  If I use - join, the output goes to a string and if statement I put in quotes below

    "

    If ($HDdetailsHT. ("' 15% free"-lt) {}

    $HDdetailsHT.Add ("low disk space on ', ' $(($HD |))") where {$_.} FreeSpaceGB / $_. ({CapacityGB * 100-[int] - lt 15}). Path)")

    }

    "

    The above if the statement will not work if I change one of the lines, for example:

    'CapacityGB' = ($HD. CapacityGB | foreach {$_ - as [int]})-join «,»


    If I do the above, all the data shows, but the if statement does not work anymore, because now, there's some string data.  I can't imagine a way to use my if statement and to show all the data entirely.  Given that some virtual machines may be small on space, I don't want the "low disk space on ' to show everything.  Any help is appreciated.

    $AllHDdetails = @)

    $AllVMs = get - VM 'VM1', 'VM2.

    {foreach ($vm to $AllVMs)

    $HD = $vm. Guest.Disks | Path of kind

    $HDdetailsHT [ordered] = @ {}

    "VM" = $vm. Name

    'Path' = $HD. Path

    'CapacityGB' = $HD. CapacityGB | foreach {$_ - as [int]}

    'FreespaceGB' = $HD. FreespaceGB | foreach {$_ - as [int]}

    "% Free" = $HD | foreach ({$_.}) FreeSpaceGB / $_. {CapacityGB) * 100 - as [int]}

    }

    If ($HDdetailsHT. ("' 15% free"-lt) {}

    $HDdetailsHT.Add ("low disk space on ', ' $(($HD |))") where {$_.} FreeSpaceGB / $_. ({CapacityGB * 100-[int] - lt 15}). Path)")

    }

    $HDdetails = new-Object PSObject - property $HDdetailsHT

    $AllHDdetails += $HDdetails

    }

    $AllHDdetails

    If you want only when there is not enough disk space, and if you can live with object with different properties in production, you could do something like this

    $HDdetailsHT [ordered] = @ {}

    "VM" = $vm. Name

    'Path' = $HD. Path

    'CapacityGB' = ($HD. CapacityGB | foreach {$_ - as [int]})-join «,»

    'FreespaceGB' = ($HD. FreespaceGB | foreach {$_ - as [int]})-join «,»

    "% Free" = ($HD | {($_.) foreach}) FreeSpaceGB / $_. ({CapacityGB) * 100 - as [int]})-join «,»

    }

    }

    $low = $HD | where {($_.)} FreeSpaceGB / $_. (CapacityGB * 100-en tant que [int]) - lt 15} | Select the path - ExpandProperty

    {if ($Low)}

    Add-Member - InputObject $HDdetailsHT - name "low disk space on ' - value $low - MemberType NoteProperty

    }

  • Helps with the formatting of a field of text PDF

    I am trying to enter in a multiline to a form text field my company uses internally.  I have set to automatic to allow as much or as little depending on font size.  I did it in the past and it worked fine, but this time when I save the form, and that you try to use the text field, I have the following questions:

    (1) rather than aiming upward, to the left of the text field is towards the left about 2/3 of the way on the text field.

    (2) pressing on enter to move to the next line of text, the space between lines of text is huge (like the size of the point 60) rather than a single space between the lines.

    Can someone advise please how to fix these issues?

    Thank you!

    You use the Cambria police by chance? If so, you will need to use something else since it is quite buggy.

  • Help with the MOUSE_OVER and MOUSE_OUT events

    Hello

    I am very new to Flash and I'm having a bit of a problem with my first ActionScript.

    I'm working on a project where I have a black and white photo. When you hover over the image, it turns to a color version of the same image. When you take your mouse out of the picture, it was in black and white.

    I have three instances of the image, a black and white image to frame 1, a color to frame 10 image and a black and white image to frame 20. Currently, when I mouse over the black and white photo, it turns to color image as I had hoped. However, when my mouse leaves the image, she remains on the color image.

    My code looks like this:

    import flash.events.MouseEvent;

    Stop();

    btnCory.addEventListener (MouseEvent.MOUSE_OVER, coryOn);
    btnCory2.addEventListener (MouseEvent.MOUSE_OUT, coryOff);
    function coryOn(event:MouseEvent):void {}
    gotoAndStop (10)
    }
    function coryOff(event:MouseEvent):void {}
    gotoAndStop (20)
    }

    btnCory is the first black and white photo in frame 1, btnCory2 is the frame of 10 color picture.

    Any comments / help would be much appreciated.


    Thank you


    Jeremy

    your movieclip with images on frame 1, 10 and 20 must have a name (for example, image_mc) and you do not need to convert images on 1 and 10 executives (and 20 if there is no point to have a duplicate on frames 1 and 20 image) to objects and your code should look like:

    import flash.events.MouseEvent;

    Stop();

    image_mc.addEventListener (MouseEvent.MOUSE_OVER, NFB);
    image_mc.addEventListener (MouseEvent.MOUSE_OUT, offF);
    function onF(event:MouseEvent):void {}
    image_mc.gotoAndStop (10)
    }
    function offF(event:MouseEvent):void {}
    image_mc.gotoAndStop (1);
    }

    and a message in the cc forum I see you are using 5 images, so use:

    import flash.events.MouseEvent;

    Stop();

    image_mc.addEventListener (MouseEvent.MOUSE_OVER, NFB);
    image_mc.addEventListener (MouseEvent.MOUSE_OUT, offF);
    function onF(event:MouseEvent):void {}
    MovieClip (e.currentTarget) .gotoAndStop (10)
    }
    function offF(event:MouseEvent):void {}
    MovieClip (e.currentTarget) .gotoAndStop (1);
    }

  • Need help with the links and the fill color

    Hi all, I just recently discovered liveCycle and I am very impressed with it! I tried to get a calendar of working from home for awhile now and I did for the most part, but there are a few things more that I would like to add that I do not know how to do.

    I have experience HTML and Java, but very few XML or JavaScript experience. I have a feeling that what I try to do is relatively simple, but I just can't understand it! I spent hours on Google and the help files, and I feel that I got the end again, but not joy.

    I have attached my calendar (truncated to fit the size of max 5 MB attachments) so far. I would like it to do more than two things:

    1. have the background color of the table cells change from white to green when the checkbox is enabled.

    (Alternatively, I would really like to get rid of boxes to tick all the thogether and just the table cells background become green with a hotkey, such as "ctrl + D" to 'make'.) "But if this is not possible, then the color change with the box is fine).

    2. I want the button called "WORD DOC" in the upper right of the form to open a document in word on my local computer. I just push this button and a doc of work opens right in Word in another window.

    I was able to get. PDFs to open in the other two buttons here ('Big Java' and 'Beginning Java II') by adding the script

    app.openDoc ("Big Java.pdf");

    and

    app.openDoc ("Java beginning II.pdf");

    for each buttons respectively, but these PDF files must be in the same folder as the calendar to make it work. I tried just to edit this script by replacing the name of the PDF file by the name of a file to Word doc like this:

    app.openDoc ("test.docx");

    but the button does not work, there is simply nothing.

    So what I'm trying to do. I spent hours messing around with everything I could think of to make it work, but unfortunately I do not know the language well enough so he can work.

    I'd appreciate really any advice on this at all. I thank very you much for your review.

    Click on the second box to check and see the result.

    Is that what you want?

    Nith

  • Help with the VLAN and RVS4000

    I am trying to Setup VLAN on a RVS4000 to share our Internet connection with another office but do not allow access to our network of the other network. We have a BEFSX41 connected to Internet and also connected to our other site via a virtual private network to another BEFSX41. Port 1 on the BEFSX41 connects to Port 1 on an EZXS88W switch.

    The other company has provided the RVS4000 and also provides a WRT54GS router. I want to connect 2 ports on the BEFSX41 to Port 1 on the RVS4000 and 2 ports on the RVS4000 to track 1 on the WRT54GS.

    Port 1 on the RVS4000 is member of the default VLAN1 and Port 2 will be a member of VLAN2.

    Our IP network is 192.168.20.0/24

    BEFSX41 is 192.168.20.1

    The DHCP service is disabled

    The RVS4000 has a static IP address of 192.168.20.254 and is configured as a router

    DHCP is also disabled

    The wireless network is as follows:

    IP network is 192.168.21.0/24

    The address IP of WRT54GS is 192.168.21.254 and is static and also configured as a router.

    I don't know how to actually Setup the VLAN from here and the instructions are not useful. My questions are:

    1 port 1 on the RVS4000 must be safe, with label or Untagged?

    2 If the interval routing disabled?

    3. If so, how do I route between the RVS4000 and WRIGHT so the two networks have access to the Internet, but not to other networks?

    The befsx41 should be one that is connected to the internet so that your final point so that the vpn tunnel work. The wan port on the wrt54g must be connected to the lan of the befsx41 port.

    If your server is located behind the befsx41, you should be able to port forwarding. If your server is located behind the wrt54g you may experience the problem with the redirect because you need to forward ports on both routers and according to me, there are some applications that do not work on double NAT.

    If you want to have access to the internet on both VLAN of the rvs4000, it should work as a router so its internet port must be connected to the port the befsx41 lan.

  • HP Pavilion a6000n - improvement of the system. Need help with the decision and suggestions

    Hi all

    I have a HP Pavilion a6000n, spec even with this link , except that I have 3 GB of memory and Window Vista Home Premium 32-bit.

    I think to update some of my computer hardwares that can run more smooth in some games and to improve my gaming experience.

    I'm looking to replace the processor and graphics card.  At the present time, I have an AMD Athlon (TM) 64 X 2 Dual Core Processor 4200 + 2.2 and a NVIDIA Geforce 6150SE nforce 430.

    My price range is around $100-$200 for processor and graphics together.

    I looked at cela processor and graphics card

    They will make a big difference and improvement than what I have at the moment?   If this isn't the case, then can you guys give me some suggestions on the choice of the better ones out there?

    Thank you!

    You have only a 300w ATX PSU (Power Supply Unit), then you will need to update if you plan to install a good graphics card.  Check the manufacturers minimum power required for the card you decide on getting.  As for the CPU, it does not require the upgrade - the graphics card is what causes your performance problems (in the games).  I would like to spend more money on a power supply and graphics card and leave the CPU alon (so far )

    Message edited by Kalt on 05/12/2008 23:18
  • Please help with the format of the report

    Hello

    When I queryiing my result is like

    Select * from the general;
    MONTH    REGISTERD   ACCEPTED   REJECTED 
    2012-04        120             80               40 
    2012-05          80             40               40 
    2012-05         60             40               20 
    2012-04         90             40               50 
    
    How i can display my result like below :
    
                     2012-04    2012-05
    registered       210          170
    accepted        120           80
    rejected           90           60
    Thank you
    Chauvet.

    Published by: Chaumont on October 3, 2012 09:02
    SQL> SELECT status,
      2         sum(month1_amt) month1_amt,
      3         sum(month2_amt) month2_amt
      4  FROM GENERAL
      5  UNPIVOT(AMT FOR status IN ( registered AS 'REGISTERED',accepted AS 'ACCEPTED',rejected AS 'REJECTED'))
      6  PIVOT(SUM(AMT) as amt FOR MONTH IN ('2012-04' AS MONTH1,'2012-05' AS MONTH2))
      7  group by status;
    
    STATUS     MONTH1_AMT MONTH2_AMT
    ---------- ---------- ----------
    REGISTERED        210        140
    REJECTED           90         60
    ACCEPTED          120         80
    

    Published by: JAC on October 5, 2012 18:20
    I forgot to update, see no response from Frank...

  • HP Pavilion Notebook - 15-p199: need help with the installation and activation of 10 Windows after completely uninstalling Windows

    Hello HP assistants.

    I need help for a specific problem. My laptop came with an installation of Windows 8.1. Then I upgraded to 10 Windows when it became available. After a while, I decided to uninstall Windows completely (to wipe the hard drive) and install a Linux operating system.

    Now, I decided that I want to use some software that is not available on Linux and if I want to reinstall Windows 10. My problem is that Windows has completely disappeared in a form any. So now, I need to download Windows 10 from an official source (which I think can be done fairly easily from the official source of Microsoft, although if there is a better, HP official medium to do this then please recommend it) and then I need to activate Windows some how.

    As has been made clear, I have the right to use Windows 8.1 and 10 but I would need to download Windows 10 and turn it on. Is there a way to do this? I'm literally stuck without solution.

    Thanks in advance.

    Hello

    As long as the previous installation of Windows 10 had activated Ok after upgrade from 8.1, you can simply perform a new installation as described in the guide on the following link.  Note: On the activation screen, select "I don't have a product key" - Windows will activate automatically once installation is complete.

    http://www.howtogeek.com/224342/how-to-clean-install-Windows-10/

    Kind regards

    DP - K

  • Help with the lasso and auto smoothing...

    I must have done something by mistake - all of a sudden when I make a selection with my lasso tool, click on out of her, photoshop automatically smooths my selection (makes it smooth as in an oval or circle, ignoring my detailed selection).  How to remedy this situation, or disable auto-smoothing (?)?  Thanks for any help you can give.

    Set the value of the pen to a few or zero in the options bar.

    Paulo

  • Directly open an htm page to help with the TOC and header frame

    I was wondering if there was a way to directly load a specific help page and still have the images left and top display.

    For example, my main help page is:

    MyHelp\mainHelp.htm

    When I enter this url everything seems correct, and I have a TOC box with a senior that include search, etc.

    I also have a help page specific that I can navigate from the TOC framework.  Let's say that:
    Topic1.htm

    If I go MyHelp\Topic1.htm - the only thingdisplayed is the page of Topic1.htm itself and no other frames.

    Does anyone know how I can do these chassis more appear?

    Thank you

    See call WebHelp by using URLS on my site.

    See www.grainge.org for creating tips and RoboHelp

  • Need help with the query and output

    I have a table that contains a list of property and each an asset contains a category field, each an asset can have several categories assigned, then the category column is filled in a list (for example, 14, 16, 17, 19).

    The values are based on a table of categories using the primary key as a reference number (for example 14 = keyboards, 16 = Trackballs, etc..)

    I tried to understand how the power of categories so that when the category is displayed, the list will appear under the name of the category as opposed to the non referenced.

    example:
    < name cfquery = "qIndex" datasource = "#appDSN #" >
    SELECT Asset.Reference, Asset.AssetName, Asset.Category
    Assets
    WHERE category LIKE ' %#URL. Category #% '
    < / cfquery >

    < cfoutput query = "qIndex" >
    #Asset.Reference # < br / >
    #Asset.AssetName # < br / >
    #Asset.Category #.
    < / cfoutput >

    Exhibition:
    AD_987738
    Keyboard XYZ
    11, 14, 17, 18

    Table for categories are:
    CatID = primary key
    Category = category name
    CatImage = header Image

    Thanks for any help.

    Finally figured this out. Had to insert an intermediate query within the output to filter each record, otherwise he was out the results of the first record only and repeat.


    SELECT *.
    Assets
    WHERE category LIKE ' %#URL. Category #% '


    SELECT the CATEGORY, AssetID
    Assets
    WHERE assetID = #qIndex.AssetID #.


    Category category WHERE CatID IN (#catids #)


    Category: #qCat.Category #,

    #qIndex.Asset #.

    #qIndex.Reference #.

    Thanks again for the help.
    Paul

Maybe you are looking for

  • Tecra A10 - dual boot XP and Windows 7

    Can I set up my Tecra A10 Windows 7 from dual boot with XP? I created a partition on the HARD drive. When I try to start my load of CIP 2 ser XP I can almost the first Setup screen then bomb out with a message saying to continue would be detrimental

  • Y480 - activation acceleration in Intel Rapid Storage Technology

    Hello I have a Y480 and I added an mSata drive in order to use caching to improve performance. The drive works fine, but I can't figure out how to activate the cache in Intel RST. I think I need to enable RAID in the bios to use RST, but I can't find

  • Allocation table (image of unknown function)

    Hello I found a tutorial on how to acquire data using Arduino and LabVIEW to https://sites.google.com/site/tuftsroboticsclub/resources/friday-tutorial-series/data-acquisition-wi.... However, I have trouble knowing what is the red area in the picture

  • Re: Windows 7 Recovery Options

  • At startup, the missing files

    Start-up: WININET.dll is not found; URLMON.dll is not found; SzUPFUtl.dll not found.  "Unable to locate component".  iTunes = error 7. Click on the computer icon, Explorer.exe 'class not registered '. Vista Home premium. ACER Aspire 6930-6809 Desktop