Search Results

Search found 23311 results on 933 pages for 'multiple computers'.

Page 3/933 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Data Synchronization in mobile apps - multiple devices, multiple users

    - by ProgrammerNewbie
    I'm looking into building my first mobile app. One of the core features of the application is that multiple devices/users will have access to the same data -- and all of them will have CRUD rights. I believe the architecture should involve a central server where all the data is stored. The devices will use an API to interact with the server to perform its data operations (e.g. adding a record, editing a record, deleting a record). I imagine a scenario where synchronizing the data will become a problem. Assume the application should work when it is not connected to the Internet, and thus cannot communicate with this central server. So: User A is offline and edits record #100 User B is offline and edits record #100 User C is offline and deletes record #100 User C goes online (presumably, record #100 should get deleted on the server) User A and B goes online, but the records they edited no longer exist All sorts of scenarios similar to the above can come up. How is this generally handled? I plan to use MySQL, but am wondering if it's not appropriate for such a problem.

    Read the article

  • Multiple domains for different products?

    - by alexandertr
    I have a website with software applications. Is it good for SEO to choose one keyword rich domain name for each of our software products or should we stick to a single domain? From a user's perspective I think it would be easier to remember a domain that is keyword rich as the user will instantly know what this product is for. But I have read articles that the latest trend in SEO is to stick to one domain for all of your products and invest on this single domain website. Is that true? What do you advise? Should I register a separate domain for each of our products or should I use only one single domain? Should I do a 301 redirect with a .htaccess to a single domain? And what about the sitemaps? Should I register all sites in Google Webmaster Tools and post a separate sitemap for each one of them? should my main site sitemap include all pages or should separate domains have their own sitemaps?

    Read the article

  • Setting up multiple monitors KDE 12.04

    - by Brandon
    I have 1 1920x1080 display that I am using as a primary display, with a 1600x900 display off to my side. I have tried to set up the smaller display to be positioned to the right of the larger display, but I can't. The only option that works is to use it as a clone. When I connect the smaller monitor to another DVI port on my AMD Radeon HD 6950, it doesnt work at all. I can provide more information if needed. Thank you!

    Read the article

  • LINQ Query using Multiple From and Multiple Collections

    1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Text; 5:  6: namespace ConsoleApplication2 7: { 8: class Program 9: { 10: static void Main(string[] args) 11: { 12: var emps = GetEmployees(); 13: var deps = GetDepartments(); 14:  15: var results = from e in emps 16: from d in deps 17: where e.EmpNo >= 1 && d.DeptNo <= 30 18: select new { Emp = e, Dept = d }; 19: 20: foreach (var item in results) 21: { 22: Console.WriteLine("{0},{1},{2},{3}", item.Dept.DeptNo, item.Dept.DName, item.Emp.EmpNo, item.Emp.EmpName); 23: } 24: } 25:  26: private static List<Emp> GetEmployees() 27: { 28: return new List<Emp>() { 29: new Emp() { EmpNo = 1, EmpName = "Smith", DeptNo = 10 }, 30: new Emp() { EmpNo = 2, EmpName = "Narayan", DeptNo = 20 }, 31: new Emp() { EmpNo = 3, EmpName = "Rishi", DeptNo = 30 }, 32: new Emp() { EmpNo = 4, EmpName = "Guru", DeptNo = 10 }, 33: new Emp() { EmpNo = 5, EmpName = "Priya", DeptNo = 20 }, 34: new Emp() { EmpNo = 6, EmpName = "Riya", DeptNo = 10 } 35: }; 36: } 37:  38: private static List<Department> GetDepartments() 39: { 40: return new List<Department>() { 41: new Department() { DeptNo=10, DName="Accounts" }, 42: new Department() { DeptNo=20, DName="Finance" }, 43: new Department() { DeptNo=30, DName="Travel" } 44: }; 45: } 46: } 47:  48: class Emp 49: { 50: public int EmpNo { get; set; } 51: public string EmpName { get; set; } 52: public int DeptNo { get; set; } 53: } 54:  55: class Department 56: { 57: public int DeptNo { get; set; } 58: public String DName { get; set; } 59: } 60: } span.fullpost {display:none;}

    Read the article

  • best way to send messages to all subscribers with multiple subscriptions and multiple providers

    - by coding_idiot
    I'm writing an application in which - Many users can subsribe to posts made by another users. So for a single publisher there can be many subscribers. When a message is posted by an user X, all users who have subscribed to messages of User X will be sent an email. How to achieve this ? I'm thinking of using publish-subscribe pattern. And then I came through JMS. Which is the best JMS implementation to use according to your experience ? Or else what else solution do you propose to the given problem ? Shall I go for a straight-forward solution ?: User x posts a message, I find all users (from database) who subscribe to user x and then for every user, I call the sendEmail() method. [EDIT] My intention here is not to send-emails. I'm really sorry if it wasn't clear. I also have to send kind of system-notifications apart from Email to all subscribers. Right now, I've implemented the email-sending as a threadPool

    Read the article

  • What have we lost from computers 20 years ago

    - by Martin Beckett
    Following the theme of - I can't believe computers used floppy disks and did you have debuggers 20 years ago - questions (and because even putting my age in hex I don't look young anymore). What have we lost from computers 20years ago? VMS versioning file system. Make a mistake, no problem myprog.cpp;5 is still there. Home computers that powered up to give you a wordprocessor or a basic prompt in <0.5sec User ports, serial ports and ADCs that you could control things with - without an arduino APIs that actually did what they said (even DOS interrupts), without having to guess and experiment your way through layers of frameworks.

    Read the article

  • Enabling Multiple Monitor Support from Terminal Services/Remote Desktop over Citrix

    - by Nicolas Webb
    Our Remote Desktop/Terminal Services solution where I work relies on Citrix for machines not connected via the VPN. We're using Citrix Xen server (I'm pretty sure) and I'm going to try to connect to a Windows 7 Host (my work computer) and I think the RDC client runs on a Win2003 host (exposed via Citrix). Is it possible to take advantage of Windows 7 multiple monitor support for RDC with this setup? Would I need to try getting my Citrix guys to have a different host machine for the RDC (Win2008, or Win7?)? I'm probably going to connect using the OS X Citrix client, but I'd be willing to BootCamp/Fusion up a Windows instance to work remotely, as well. I really want to be able to use multiple monitors remotely. It does "span" multiple montiors currently (I have a 3000x1024 desktop, for example) but I'd rather it be "true" multiple monitor instead of one giant desktop, if possible.

    Read the article

  • git svn on multiple machines

    - by stgtscc
    My repo is SVN and I'm using git-svn to interface with it which has been working out well. I'm working on the code base from a few different machines and appreciate some insight as to what the best setup might be for me going forward. I'd like to use git primarily but I need to commit to svn (via git svn dcommit) and pull from svn (git svn rebase) periodically from potentially any of the machines. Is it possible to perhaps have git svn setup on all but somehow push and pull changes between the instances? Or should I setup a bare repo and use that as the central git repo? How would that tie in to git svn? Any insight is appreciated.

    Read the article

  • Can I do multi-computer and multi-monitor configuration with Synergy?

    - by BrianLy
    I've been asked to setup a demo room with multiple computers and monitors. We need to be able to use multiple monitors with a single PC in some cases. In other cases we need to switch between Mac and PC platforms. We would also like to be able to throw up slides or other information to screens which are not being used. Is it possible to do this with Synergy?

    Read the article

  • Can I set up two computers up with the same monitors/keyboard/mouse in a modular way?

    - by CodeJunkie
    I have a desktop computer computer (running Windows 7), and a laptop (running OSX Mountain Lion, and maybe Ubuntu 12 eventually). When the laptop is at home, I want both the desktop and the laptop to use the same (2+) monitors, the keyboard, and the mouse (or mice, if I add a track pad). I know about KVM switches, but I want something more complicated. I like to use Synergy to use both computers with one keyboard and mouse at the same time. Synergy requires that the keyboard and mouse be connected to one computer (the server), which shares them with other computers (clients) over wifi. the issue is that when one computer isn't logged in, Synergy doesn't work on it. Sometimes, I want my laptop to be the server (physically connected to the keyboard and mouse), and sometimes I want my desktop to be the server. This means that I need the keyboard/mouse/other USB devices to be able to switch computers without me playing musical plugs. To complicate things further, I don't always want the same desktop set up in terms of monitors. Sometimes, I want the desktop to have both monitors. Other times, I want the laptop to control both monitors. Sometimes I want the desktop to control one monitor, and the laptop to control the other. In any case, the keyboard and mouse need to be able to be physically connected to either computer without lots of fussing with plugs. This breaks down to at least this set of possible combinations: Desktop controls both monitors, and has a physical connection to keyboard and mouse Laptop controls both monitors, and has a physical connection to keyboard and mouse Desktop and laptop each control a monitor, but the desktop has a physical connection to the keyboard and mouse (which it shares with the laptop via wifi) Desktop and laptop each control a monitor, but the laptop has a physical connection to the keyboard an mouse (which it shares with the desktop via wifi) some usb devices connected via a usb hub need to be able to switch physical connection between computers, ideally without the keyboard and mouse switching computer connection There may be other combinations, but these are the main ones at the moment. Basically, I need a KVM switch which allows me to switch individual monitors/keyboard/mouse/usb hub between computers independently of each other, or a better solution. How can I set two computers up with the same monitors/mice/keyboard/usb hub without having to switch everything to one computer or the other all at the same time?

    Read the article

  • SQL 2K5 - Multiple databases vs. Multiple files

    - by Bob Palmer
    Hey all, quick question. Our current legacy system was built using multiple distinct databases (about ten of them). These are all part of the same discreet system, and a large number of SPs and functionalty span multiple databases. There are also key relationships that span (for example, a header table may be in database A with history, etc. in database B). When deploying multiple copies of our app to the same server therefore, we have to use multiple instances (because the database names are coded into so many sprocs). We're evaluating the idea of taking these ten databases (about 30gb total with individual sizes ranging from 100mb to 10gb) and merging them into a single database. Currently, we have our databases spread accross multiple spindles for better IO. The question I have is whether or not there is any performance loss or benefit of having 10 different databases vs. 10 different database files? i.e. rather than having three databases (A, B, and C) Disk D: A.mdf (1gb) Disk E: B.mdf (4gb) Disk F: C.mdf (10gb) Disk G: A_Log.ldf, B_Log.ldf, C_Log.ldf have one database (X) Disk D: X1.mdf (5gb) Disk E: X2.mdf (5gb) Disk F: X3.mdf (5gb) Disk G: X1_log.ldf,X2_log.ldf,X3_log.ldf Thanks! -Bob

    Read the article

  • Synergy - easy share of keyboard and mouse between multiple computers

    Did you ever have the urge to share one set of keyboard and mouse between multiple machines? If so, please read on... Using multiple machines Honestly, as a software craftsman it is my daily business to run multiple machines - either physical or virtual - to be able to solve my customers' requirements. Recent hardware equipment allows this very easily. For laptops it's a no-brainer to attach a second or even a third screen in order to extend your native display. This works quite handy and in my case I used to attached two additional screens - one via HD15 connector, the other via HDMI. But... as it's a laptop and therefore a mobile unit there are slight restrictions. Detaching and re-attaching all cables when changing locations is one of them but hardware limitations, too. After all, it's a laptop and not a workstation. I guess, that anyone working in IT (or ICT) has more than one machine at their workplace or their home office and at least I find it quite annoying to have multiple sets of keyboard and mouse conquering my remaining space on my desk. Despite the ugly looks of all those cables and whatsoever 'chaos of distraction' I prefer a more clean solution and working environment. This allows me to actually focus on my work and tasks to do rather than to worry about choosing the right combination of keyboard/mouse. My current workplace is a patch work of various pieces of hardware (approx. 2-3 years): DIY desktop on Ubuntu 12.04 64-bit, Core2 Duo (E7400, 2.8GHz), 4GB RAM, 2x 250GB HDD, nVidia GPU 512MB Dell Inspiron 1525 on Windows 8 64-bit, 4GB RAM, 200GB HDD HP Compaq 6720s on Windows Vista 32-bit, Core2 Duo (T5670, 1.8GHz), 2GB RAM, 160GB HDD Mac mini on Mac OS X 10.7, Core i5 (2.3 GHz), 2GB RAM, 500GB HDD I know... Not the latest and greatest but a decent combination to work with. New system(s) is/are already on the shopping list but I live in the 'wrong' country to buy computer hardware. So, the next trip abroad will provide me with some new stuff. Using multiple operating systems The list of hardware above already names different operating systems, and actually I have only one preference: Linux. But still my job as a software craftsman for Visual FoxPro and .NET development requires other OSes, too. Not a big deal, it's just like this. Additionally to those physical machines, there are a bunch of virtual machines around. Most of them running either Windows XP or Windows 7. Since years I have the practice that each development for one customer is isolated into its own virtual machine and environment. This keeps it clean and version-safe. But as you can easily imagine with that setup there are a couple of constraints referring to keyboard and mouse. Usually, those systems require their own pieces of hardware attached. As stated, I don't like clutter on my desk's surface, so a cross-platform solution has to come in here. In the past, I tried it with various applications, hardware or network protocols like X11, RDP, NX, TeamViewer, RAdmin, KVM switch, etc. but the problem in this case is that they either allow you to remotely connect to the other system or exclusively 'bind' your peripherals to the active system. Not optimal after all. Synergy to the rescue Quote from their website: "Synergy lets you easily share your mouse and keyboard between multiple computers on your desk, and it's Free and Open Source. Just move your mouse off the edge of one computer's screen on to another. You can even share all of your clipboards. All you need is a network connection. Synergy is cross-platform (works on Windows, Mac OS X and Linux)." Yep, that's it! All I need for my setup here... Actually, I couldn't believe it myself that I didn't stumble over synergy earlier but 'Get over it' and there we go. And despite the fact that it is Open Source, no, it's also for free. Donations for the developers are very welcome and recently they introduced Synergy Premium. A possibility to buy so-called premium votes that can be used to put more weight / importance on specific issues or bugs that you would like the developers to look into. Installation and configuration Simply download the installation packages for your systems of choice, run the installer and enter some minor information about your network setup. I chose my desktop machine for the role of the Synergy server and configured my screen setup as follows: The screen setup allows you currently to build or connect up to 15 machines. The number of screens can be higher as those machine might have multiple screens physically attached. Synergy takes this into the overall calculations and simply works as expected. I tried it for fun with a second monitor each connected to both laptops to have a total number of 6 active screens. No flaws after all - stunning! All the other machines are configured as clients like so: Side note: The screenshot was taken on Windows 8 and pasted via clipboard into Gimp running on Ubuntu. Resume Synergy is now definitely in my box of tools for my daily work, and amongst the first pieces of software I install after the operating system. It just simplifies my life and cleans my desk. Never again without Synergy!Now, only waiting for an Android version to integrate my Galaxy Tab 10.1, too. ;-) Please, check out that superb product and enjoy sharing one keyboard, one mouse and one clipboard between your various machines and operating systems.

    Read the article

  • Technology to Prevent Multiple logins to the Same Computer

    - by Ngu Soon Hui
    OK, this is a similar question to this. Actually I am trying to prevent people from multiple login into one single computer and use my application simultaneously. This is because I want to stop them from buying one license, install it on a machine, and use certain remote desktop technologies to do multiple user login. I want to prevent them from violating the license agreement. Is there anyway that I can do in my application for this? Or is multiple login simultaneously is simply not possible?

    Read the article

  • Multiple EyeFinity Display groups

    - by Shinrai
    Is it possible with an EyeFinity enabled card to make multiple display groups at once? I was playing with a FirePro 2460 and while a 4x1 or 2x2 display group works quite nicely, if I make a 2x1 display group and then select one of the other displays to try to make a second 2x1 display group, it disables the first one. Is there any way to circumvent this behavior and set up two separate spans on the same card? Additionally, can you set up distinct display groups if they're on different cards? I will have the opportunity to test several of these cards in one machine very shortly, but I'm curious if anyone has any experience. EDIT: I can confirm that you can make multiple spans on multiple cards (as long as they don't cross cards, obviously) (If the answers are different for FirePro/FireMV cards and Radeon cards, that is helpful and relevant knowledge - I doubt it, though.)

    Read the article

  • Multiple EyeFinity Display groups

    - by Shinrai
    Is it possible with an EyeFinity enabled card to make multiple display groups at once? I was playing with a FirePro 2460 and while a 4x1 or 2x2 display group works quite nicely, if I make a 2x1 display group and then select one of the other displays to try to make a second 2x1 display group, it disables the first one. Is there any way to circumvent this behavior and set up two separate spans on the same card? Additionally, can you set up distinct display groups if they're on different cards? I will have the opportunity to test several of these cards in one machine very shortly, but I'm curious if anyone has any experience. EDIT: I can confirm that you can make multiple spans on multiple cards (as long as they don't cross cards, obviously) (If the answers are different for FirePro/FireMV cards and Radeon cards, that is helpful and relevant knowledge - I doubt it, though.)

    Read the article

  • Multiple computers on Ubuntu One

    - by L R Bellmore Jr
    I have added files from 4 computers to Ubuntu One. One computer failed. What happens to the files that I uploaded. Are they still on Ubuntu One? How come when I upload a file from computer A, computer B with the same Ubuntu One account does not sync and load that file into computer B - That has created this question.. what happens to files from computers from which I uploaded documents when those computers are no longer active or failed, or no longer have Ubuntu One on that computer from which the files were uploaded... Have I lost the files? The followup question is how come files from Computer A uploaded to Ubuntu One don't sync to Computer B. That is a related question. I need to shut down a computer, reformat the hard drive and install Linux on the entire harddrive instead of a dual boot with Windows XP as I am going to use Virtual Machines instead.. what happens to the files from the Windows Dual Boot that were uploaded to Ubuntu One? Are they removed from Ubuntu One and then have I lost those files if I don't backup to another service first.

    Read the article

  • Can I use Ubuntu One to sync data fiies between two remote computers

    - by Sleepy John
    I've got two computers, both running Ubuntu with files in their home folders sync'd in to Ubuntu One. I'd like to know if it's possible to make Ubuntu One automatically download data changes that have been uploaded automatically to Ubuntu One from one computer to the equivalent data file in the other. Clarifying a bit further, I've installed Red Notebook in both computers and so they each have their own /.rednotebook/data folder containing a series of .txt files corresponding to the monthly entries in each of them. These are sync'd to upload any changes to those .txt files to Ubuntu One. My question is can I, and if so how, do I make Ubuntu One automatically download and replace those .txt files in the other computer after they've been updated and uploaded from the first computer? I did labouriously manage to download all those text files which had been uploaded from the first computer, from Ubuntu One one-by-one to the second computer, but what I want to do is automate this process and that's where I'm stuck. I'm aware that things could get a bit complicated if both my computers were on-line at the same time and both were simultaneously making different Red Notebook entries, so that's not the scenario I'm trying to cover. All I want to achieve is that whatever updates to the files have been uploaded by one computer, will automatically be downloaded to the same-named files in the other computer as soon as that second computer appears on line and detects that Ubuntu One has matching but more recent sync'd files than the ones it's holding.

    Read the article

  • Multiple inheritance in OOPS

    - by user145610
    I'm confused about an OOPS feature, multiple inheritance. Does OOPS allow Multiple Inheritance? Is Multiple Inheritance a feature of OOPS? If Multiple Inheritance is a feature then why don't languages like C#, VB.NET, java etc. support multiple inheritance? But those languages are considered as strongly supported OOPS language. Can anyone address this question?

    Read the article

  • KVM Switch for multiple monitors possible?

    - by jasondavis
    I have been curious about this for YEARS! I have never used a KVM switch (keyboard, mouse, monitor) switch to allow you to use 1 keyboard, mouse, monitor to operate 2 or more computers however I understand the concept and what they are for, just never really had a huge need for 1 until now. Here is my issue though. If possible I need to have a KVM switch hooked up to 2 computers in my room. The catch, I have 2-3 monitors on the PC, so I am looking for a way to have a KVM switch that will support multiple monitors. So PC #1 can be using a mouse, keyboard, 2-3 monitors like normal. I then hit the switch and it makes my mouse, keyboard, and 2-3 monitors switch to PC #2. Has anyone ever heard of a KVM switch being able to support multiple monitors like I described? Or how I can achieve this goal? Please help.

    Read the article

  • How should I isolate computers with different roles on a network

    - by fishhead
    I work in an industrial plant and we have one network(physical wire) that us used for both office usage and for process systems. The office computers are only used for typical office needs but occasionally do connect to the process computers to obtain information from a sql server or for some other purpose. A new initiative is in the works and is rolling down hill from corporate and that is to standardize how the the computers are used at work and they would be severely locked down and only a standard set of applications will be allowed to execute. one of the requirements is to also have non office computers isolated from the company domain. our non-office computers are a mix of Man-Machine interfaces and sql-servers all running software that non standard. My question is, how can we divorce the control systems computers from the company domain but still have access to the servers from the company domain. thanks

    Read the article

  • How should I isolate computers with different roles on a network

    - by fishhead
    I work in an industrial plant and we have one network(physical wire) that us used for both office usage and for process systems. The office computers are only used for typical office needs but occasionally do connect to the process computers to obtain information from a sql server or for some other purpose. A new initiative is in the works and is rolling down hill from corporate and that is to standardize how the the computers are used at work and they would be severely locked down and only a standard set of applications will be allowed to execute. one of the requirements is to also have non office computers isolated from the company domain. our non-office computers are a mix of Man-Machine interfaces and sql-servers all running software that non standard. My question is, how can we divorce the control systems computers from the company domain but still have access to the servers from the company domain. thanks

    Read the article

  • Domain Computers Not Listed In Network

    - by Giawa
    Our network computers are all connected to a domain, and I can see them if I search the active directory (I can click 'search active directory' and then select 'computers' and then Find Now, and all of the computers will appear). However, the computers are not listed in the network browser on any of our computers (Win XP, Win7, Linux, etc) which are connected to the domain. DC is running Windows Server 2008 (Windows Server Standard) with a configured DNS and DHCP server. All of the IPs on our local network are static IPs, although I can't see how that would make a difference. I can still connect to computers on the network via \\computer_name, but I cannot browse them in 'network' or in 'my network places'. The computer browser service is not started on the DC, but I tried starting that and it had no effect. DC currently has the firewall configured as 'off' to try to debug this problem. Thanks in advance

    Read the article

  • Join multiple filesystems (on multiple computers) into one big volume

    - by jm666
    Scenario: Have 10 computers, each have 12x2TB HDDs (currently) in raidZ2 (10+2) configuration, so, in the each computer i have one approx. 20TB volume. Now, need those 10 separate computers (separate raid groups) join into one big volume. What is the recommended solution? I'm thinking about the FCoE (10GB ethernet). So, buying into each computer FCoE (10GB ethernet card) and - what need more on the hardware side? (probably another computer, FCoE switch? like Cisco Nexus?) The main question is: what need to install and configure on each computer? Currently they have freebsd/raidz2, but it is possible change it into Linux/Solaris if needed. Any helpful resource what talking about how to build a big volumes from smaller raid-groups (on the software side) is very welcomed. So, what OS, what filesystem, what software - etc. In short: want get one approx. 200TB storage (in one filesystem) from already existing computers/storage. Don't need fast writes, but need good performance on reading data. (as a big fileserver), what will works transparently, so when storing data don't want care about onto what computer the data goes. (e.g. not 10 mountpoints - but one big logical filesystem). Thanks.

    Read the article

  • How to export computers from Active Directory to XML using Powershell?

    - by CoDeRs
    I am trying to create a powershell scripts for Remote Desktop Connection Manager using the active directory module. My first thought was get a list of computers in AD and parse them out into XML format similar to the OU structure that is in AD. I have no problem with that, the below code will work just but not how I wanted. EG # here is a the array $OUs Americas/Canada/Canada Computers/Desktops Americas/Canada/Canada Computers/Laptops Americas/Canada/Canada Computers/Virtual Computers Americas/USA/USA Computers/Laptops Computers Disabled Accounts Domain Controllers EMEA/UK/UK Computers/Desktops EMEA/UK/UK Computers/Laptops Outside Sales and Service/Laptops Servers I wanted to have the basic XML structured like this Americas Canada Canada Computers Desktops Laptops Virtual Computers USA USA Computers Laptops Computers Disabled Accounts Domain Controllers EMEA UK UK Computers Desktops Laptops Outside Sales and Service Laptops Servers However if you run the below it does not nest the next string in the array it only restarts the from the beginning and duplicating Americas Canada Canada Computers Desktops Americas Canada Canada Computers Laptops Americas Canada Canada Computers Virtual Computers Americas USA USA Computers Laptops RDCMGenerator.ps1 #Importing Microsoft`s PowerShell-module for administering ActiveDirectory Import-Module ActiveDirectory #Initial variables $OUs = @() $RDCMVer = "2.2" $userName = "domain\username" $password = "Hashed Password+" $Path = "$env:temp\test.xml" $allComputers = Get-ADComputer -LDAPFilter "(OperatingSystem=*)" -Properties Name,Description,CanonicalName | Sort-Object CanonicalName | select Name,Description,CanonicalName $allOUObjects = $allComputers | Foreach {"$($_.CanonicalName)"} Function Initialize-XML{ ##<RDCMan schemaVersion="1"> $xmlWriter.WriteStartElement('RDCMan') $XmlWriter.WriteAttributeString('schemaVersion', '1') $xmlWriter.WriteElementString('version',$RDCMVer) $xmlWriter.WriteStartElement('file') $xmlWriter.WriteStartElement('properties') $xmlWriter.WriteElementString('name',$env:userdomain) $xmlWriter.WriteElementString('expanded','true') $xmlWriter.WriteElementString('comment','') $xmlWriter.WriteStartElement('logonCredentials') $XmlWriter.WriteAttributeString('inherit', 'None') $xmlWriter.WriteElementString('userName',$userName) $xmlWriter.WriteElementString('domain',$env:userdomain) $xmlWriter.WriteStartElement('password') $XmlWriter.WriteAttributeString('storeAsClearText', 'false') $XmlWriter.WriteRaw($password) $xmlWriter.WriteEndElement() $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('connectionSettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('gatewaySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('remoteDesktop') $XmlWriter.WriteAttributeString('inherit', 'None') $xmlWriter.WriteElementString('size','1024 x 768') $xmlWriter.WriteElementString('sameSizeAsClientArea','True') $xmlWriter.WriteElementString('fullScreen','False') $xmlWriter.WriteElementString('colorDepth','32') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('localResources') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('securitySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('displaySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteEndElement() } Function Create-Group ($groupName){ #Start Group $xmlWriter.WriteStartElement('properties') $xmlWriter.WriteElementString('name',$groupName) $xmlWriter.WriteElementString('expanded','true') $xmlWriter.WriteElementString('comment','') $xmlWriter.WriteStartElement('logonCredentials') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('connectionSettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('gatewaySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('remoteDesktop') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('localResources') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('securitySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('displaySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteEndElement() } Function Create-Server ($computerName, $computerDescription) { #Start Server $xmlWriter.WriteStartElement('server') $xmlWriter.WriteElementString('name',$computerName) $xmlWriter.WriteElementString('displayName',$computerDescription) $xmlWriter.WriteElementString('comment','') $xmlWriter.WriteStartElement('logonCredentials') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('connectionSettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('gatewaySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('remoteDesktop') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('localResources') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('securitySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteStartElement('displaySettings') $XmlWriter.WriteAttributeString('inherit', 'FromParent') $xmlWriter.WriteEndElement() $xmlWriter.WriteEndElement() #Stop Server } Function Close-XML { $xmlWriter.WriteEndElement() $xmlWriter.WriteEndElement() # finalize the document: $xmlWriter.Flush() $xmlWriter.Close() notepad $path } #Strip out Domain and Computer Name from CanonicalName foreach($OU in $allOUObjects){ $newSplit = $OU.split("/") $rebildOU = "" for($i=1; $i -le ($newSplit.count - 2); $i++){ $rebildOU += $newSplit[$i] + "/" } $OUs += $rebildOU.substring(0,($rebildOU.length - 1)) } #Remove Duplicate OU's $OUs = $OUs | select -uniq #$OUs # get an XMLTextWriter to create the XML $XmlWriter = New-Object System.XMl.XmlTextWriter($Path,$UTF8) # choose a pretty formatting: $xmlWriter.Formatting = 'Indented' $xmlWriter.Indentation = 1 $XmlWriter.IndentChar = "`t" # write the header $xmlWriter.WriteStartDocument() # # 'encoding', 'utf-8' How? # # set XSL statements #Initialize Pre-Defined XML Initialize-XML ######################################################### # Start Loop for each OU-Path that has a computer in it ######################################################### foreach ($OU in $OUs){ $totalGroupName = "" #Create / Reset Total OU-Path Completed $OU.split("/") | foreach { #Split the OU-Path into individual OU's $groupName = "$_" #Current OU $totalGroupName += $groupName + "/" #Total OU-Path Completed $xmlWriter.WriteStartElement('group') #Start new XML Group Create-Group $groupName #Call function to create XML Group ################################################ # Start Loop for each Computer in $allComputers ################################################ foreach($computer in $allComputers){ $computerOU = $computer.CanonicalName #Set the computers OU-Path $OUSplit = $computerOU.split("/") #Create the Split for the OU-Path $rebiltOU = "" #Create / Reset the stripped OU-Path for($i=1; $i -le ($OUSplit.count - 2); $i++){ #Start Loop for OU-Path to strip out the Domain and Computer Name $rebiltOU += $OUSplit[$i] + "/" #Rebuild the stripped OU-Path } if ($rebiltOU -eq $totalGroupName){ #Compare the Current OU-Path with the computers stripped OU-Path $computerName = $computer.Name #Set the computer name $computerDescription = $computerName + " - " + $computer.Description #Set the computer Description Create-Server $computerName $computerDescription #Call function to create XML Server } } } ################################################### # Start Loop to close out XML Groups created above ################################################### $totalGroupName.split("/") | foreach { #Split the if ($_ -ne "" ){ $xmlWriter.WriteEndElement() #End Group } } } Close-XML

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >