Samstag, 20. November 2010

'General access denied error' (0x80070005) when Starting Hyper-V Virtual Machines


Rechte für neuen Ordner VM manuell vergeben




wenn ich unter WS2008R2 eine VM exportiere und an einen neuen Ort (nicht auf dem System Volume) imporiere, schlägt der Import fehl. Es fehlen Rechte im Ordner "Virtual Machines". Im Ordner "Virtual Hard Disks" werden diese automatisch gesetzt. Für diesen Ordner gibt es ein Konto "Virtuelle Computer", das im Ordner "Virtual Machines" beim Importprozess nicht angelegt wird. Es gelingt mir nicht, manuell dem Konto "Virtuelle Computer" Rechte zuzuordnen, da ich dieses nicht auswählen kann. Auch der Befehl

ich habe gerade leider keine Deutsche Installation zur Hand, aber meine Vermutung bleibt weiterhin bei den Objektnamen. Wir könnten es aber auch anders rum probieren (der SID sollte theoretisch der gleiche für alle Installationen sein)

was sagt psgetsid S-1-5-83-0 ?

funktioniert die Zuordnung der Berechtigungen direkt per SID?

icacls "S:\VM\Virtual Machines" /grant *S-1-5-83-0:(CI)(F)



oder

icacls "S:\VM\Virtual Machines" /grant NT VIRTUELLER COMPUTER\Virtuelle Computer:(CI)(F)

sollte für eine deutsche Installation dann auch passen.

und ja, die NT Virtual Machine/NT Virtueller Computer Domäne (S-1-5-83wird vom System in den Benutzer abfragen nicht gelistet, da diese hauptsächlich nur von Hyper-V intern benutzt wird. Unter dieser Domäne befinden sich die VM SIDs (jede VM Datei hat eine speziellen Eintrag im ACL in Form eines GUIDs) die zur Berechtigungserteilung (für den Dateizugriff vom VM Worker Process) benutzt werden. 

Donnerstag, 18. November 2010

Import Exchange Global Address List (GAL) images into Active Directory (Part 3)

ADPhoto

Outlook 2010, Lync 2010 und diverse andere Lösungen können neben dem Namen und Mailadressen auch Bilder angezeigt werden. Hier zwei Beispiele: Einmal der Lync 2010 Client mit Herrn Deutinger (Ferrari Electronic) als Partner in der Federation und Herr Ulbrich in Outlook. 
 
Da stellt sich natürlich die Frage, wo dieses Bild hinterlegt ist. Im Fall von Outlook könnte man noch tricksen, indem man einen Kontakt mit dem Bild anlegt. In Lync kann ich ein Bild auf einem Webserver ablegen und über eine URL erreichbar machen und so "verbreiten".
Zumindest für Mitarbeiter ist es aber schon seit Windows 2003 möglich, solche Informationen im Active Directory mit zu hinterlegen.
Berechtigungen: Ein Benutzer kann sein Bild nicht selbst aktualisieren. Es muss also ein administrativer Benutzer sein, welcher auf das Feld "ThumbnailPhoto" zum Schreiben berechtigt ist.
Solche Updates muss also ein entsprechend auf das Benutzerobjekt privilegiertes Konto durchführen.

Hintergrund "ThumbnailPhoto"

Das Feld welches von Outlook, Exchange und Lync genutzt wird, ist das Property "ThumbnailPhoto". Allerdings gibt es noch andere Felder, die ähnliche Funktionen haben und daher leicht verwechselt werden können:
FeldnameSchema VersionTyp/Größe 
ThumbnailphotoWindows 2003 und höherOktet 0-10240 byte
Einwertig
Im GC ab Windows 2008
Einsatz in OCS/Outlook
jpegPhoto
http://msdn.microsoft.com/en-us/library/ms676813
Windows 2003 und höherOktet ohne grenzen
Mehrwertig
nicht genutzt
ThumbnaillogoWindows 2003 und höher0-32767
Einwertig
nicht genutzt
Relevant ist, wie gesagt, nur das Feld "Thumbnailphoto", dessen genaue Definition im Schema zu sehen ist:

Import mit Bordmittel

Da diese Funktion erstmalig mit Exchange 2010 und Outlook 2010 verfügbar wurde, gibt es auch ein Exchange Commandlet zum Import.
Import-RecipientDataProperty 
  -Identity username 
  -Picture -FileData ([Byte[]]$(Get-Content -Path "c:\user.jpg" -Encoding Byte -ReadCount 0))
Wer also die Bilder schön z.B. mit dem SamAccountName benannt hat, kann recht einfach eine Schleife durch das Verzeichnis der Bilder drehen und die dazu gehörigen Benutzer entsprechend aktualisieren. Allerdings kann dieses Commandlet das Bild nicht auf die richte Größe zusammenschrumpfen. Sie müssen schon selbst dafür sorgen, dass das Bild maximal 10 kB groß ist.

ADPhotoEdit

Wo Bordmittel an ihre Grenzen stoßen, öffnet sich ein Markt für Drittanbieter oder Freeware-Tools. Unter all den vielen Programmen und Skripten, die die JPG-Bilder in das passende Feld im AD importieren, gibt es mit ADPhotoEdit ein nettes Programm, welches die Verwaltung per GUI stark vereinfacht und sogar die Bilder zurecht schrumpfen kann.
Das Programm "AD Photo Edit" kann per GUI einfach Bilder anzeigen und auch verändern und wieder speichern.
http://www.cjwdev.co.uk/Software/ADPhotoEdit/Info.html
Das kleine ZIP-Paket muss einfach ausgepackt und das Setup aufgerufen werden.
Das Programm prüft beim Aufruf nach Updates, indem es versucht auf www.cjwdev.co.uk zuzugreifen.

Aber unschön ist es
Das Programm selbst ist ein kleines .NET Programm mit grade mal wenigen kb Größe. Wobei natürlich das .NET Framework vorhanden sein muss.
Nach dem Start suche sie nach den Benutzern. Wenn Sie im Filterfeld ein "*" eintragen, dann werden alle Benutzer gesucht.
Sie sehen dann sofort die Benutzer und neben dem SAMAccountName auch die Mailadresse und das Bild, sofern vorhanden. Das Bild ist dabei nicht auf eine bestimmte Größe (in Pixel) beschränkt, sondern in der Dateigröße. Das Programm ist smart genug, auch ein sehr großes Bild so zu verkleinern, dass es in die 10kb des Feldes ThumbnailPhoto passt. Da fehlt dann wirklich nur noch der Bulk Import.
Schade, dass ein Benutzer das Bild nicht selbst aktualisieren kann. Dazu fehlen ihm sowohl die Rechte als auch die Hilfsmittel.

Mittwoch, 17. November 2010

Microsoft Lync 2010 information and resources


Earlier today I posted up on my Twitter account about some Microsoft Lync 2010 training resources and I have received very good feedback around this with some requests for additional Lync 2010 resources.  As such I thought I would put together a collection here for you to use, much like I have done with some other topics before:
If you are a Microsoft Partner, check out the Microsoft Partner Network Microsoft Lync page where you will find a ton of information for you, such as:
  • Lync Server 2010 Technical Resources
  • Lync Server 2010 Sales Resources
  • Lync Server 2010 RC download
  • Information on the Unified Communications Competency
  • and more…
For everyone, here are several other Microsoft Lync 2010 resources for you:
Hopefully these resources are helpful for you as you explore Microsoft Lync 2010 further.

Dienstag, 16. November 2010

Microsoft Forefront TMG and ISP Redundancy


One of the great new features of Microsoft Forefront TMG is ISP Redundancy. With the help of this feature it is now possible to load balance the network traffic between two different ISPs (Internet Service Providers). One other configuration mode is the ability to configure Microsoft Forefront TMG for ISP Failover. In this case, Forefront TMG will use one ISP link as the primary connection, and if this link gets broken, TMG will automatically failover to the second configured ISP.

Configuration of ISP Redundancy

Let us start with the configuration of the ISP Redundancy Mode. Start the Forefront TMG Management Console, navigate to the Networking node and select the ISP Redundancy tab and in the Task pane click Configure ISP Redundancy.

Figure 1: ISP Redundancy window
The ISP Redundancy Wizard gets started and will guide you through the configuration process.

Figure 2: ISP Redundancy Configuration Wizard
First you have to choose between two modes for the ISP Redundancy behavior.
  • ISP Load Balancing
  • ISP Failover
ISP Load Balancing is used to balance the network traffic between the two configured ISP links.
ISP Failover is used to provide an alternative method for a connection to the Internet if the primary ISP link is down due to problems or maintenance reasons. ISP Failover is s great feature for small and medium sized businesses with a simplier network infrastructure which wants to provide failover capabilities for two ISP links. The primary ISP link is often the fastest and cheaper connection and when this connection becomes unavailable TMG will failover to the backup ISP.

Figure 3: Select ISP Redundancy Behavior

ISP Load Balancing


In our first example we chose Load Balancing between two ISP links. You must specify the Network Adapter used for the ISP. First select a name for the ISP and the network adapter which is used to connect to that ISP.

Figure 4: Select Network Adapters for ISP Redundancy
After selecting the first ISP link, the following configuration dialog allows us to configure ISP connection properties like the Gateway IP address and the DNS Server used by this connection.

Figure 5: Connection Properties of ISP
The TMG wizard automatically creates TMG computer objects which can be used as a list of Servers which should route through this ISP.

Figure 6: ISP DNS Server properties
After the configuration of the first ISP has finished you have to configure the second ISP in the same manner as the first ISP. After both ISP connections are configured, you have the choice to balance the load between the two configured ISP. If your ISP bandwidth is the same for both links, what is normally done is to configure an even load between both ISPs. If one ISP has a lower bandwidth than the other ISP, move the slider to set the percentage of traffic this ISP link should handle.

Figure 7: ISP Load Balancing Factor
Click Finish to end the ISP configuration wizard and after that click Apply to save the configuration changes.

Monitor ISP Redundancy

Microsoft Forefront TMG has some capabilities to monitor the ISP Redundancy feature. If you want to see the load and the status of each configured ISP, you can use the Dashboard of the Microsoft Forefront TMG Management Console. The Dashboard function allows you to see the uptime of each ISP and the actually transmitted Bytes per second through each ISP link as you can see in the following screenshot.

Figure 8: Monitoring ISP Redundancy

ISP Failover

After successfully configuring the ISP Load Balancing feature, I will now show you how to configure the ISP failover feature of Forefront TMG. To change the TMG behavior from Load Balancing to Failover, click the ISP Failover link in the task pane of the ISP Redundancy feature tab.

Figure 9: Display ISP Redundancy Mode

ISP Connection Test

The ISP Redundancy configuration has also the option of simulating a broken link or forcing Forefront TMG to mark another ISP connection as active. This can be useful for simulating a broken link or to test the functionality.

Figure 10: ISP Failover Connection Role
It is possible to choose between three Test options:
  • Automatic
  • Always On
  • Always Off

Figure 11: ISP Load Balancing Ratio

ISP Failover Alerting

Microsoft Forefront TMG has some builtin capabilities for alerting the TMG Administrator if there are any problems with the ISP Redundancy feature. TMG comes with five new alert options which are:
  • ISP link is available – Monitors when the ISP link is (again) available
  • ISP Link address missing – No IP address is configured on a network adapter of the TMG Server which can be associated with the ISP Link
  • ISP Link is active – This alert is triggered when an ISP link is active and network traffic passes through this adapter
  • ISP Link is unavailable – Alerts when the ISP link is unavailable or not connected
  • Both ISP Links are unavailable – Both ISP links are unavailable and unusable
If one condition reachs this status the Forefront TMG Administrator has many options to get informtion by sending an e-mail or a network message. It is also possible to execute custom commands or to start/stop/restart some services.

Figure 12: ISP Load Balancing / Failover alerting

Conclusion

In this article, I tried to show you how to configure Microsoft Forefront TMG for ISP Load Balancing to failover between different ISPs. This new feature is excellent for small and medium business who want to share multiple ISP connections or want to have a way of failover between a primary and most powerful ISP link and a lower bandwidth link for backup purposes.

Montag, 15. November 2010

Import Exchange Global Address List (GAL) images into Active Directory (Part 2)

Over the years, displaying recipient photographs in the Global Address List (GAL) has been a frequently-requested feature, high on the wish lists of many Exchange folks. Particularly in large organizations or geographically dispersed teams, it's great to be able to put a face to a name for people you've never met or don't frequently have face time with. Employees are commonly photographed when issuing badges/IDs, and many organizations publish the photos on intranets.
There have been questions about workarounds or third-party add-ins for Outlook, and you can also find some sample code on MSDN and elsewhere. A few years ago, an IT person wrote ASP code to make employee photos show up on the intranet based on the Employee ID attribute in Active Directory (AD) - which was imported from the company's LDAP directory. A fun project to satisfy the coder alter-ego of the IT person.
Luckily, you won't need to turn to your alter-ego to do this. Exchange 2010 and Outlook 2010 make this task a snap, with help from AD. AD includes the Picture attribute (we'll refer to it using its ldapDisplayName: thumbnailPhoto) to store thumbnail photos, and you can easily import photos— not the high-res ones from your 20 megapixel digital camera, but small, less-than-10K-ish ones, using Exchange 2010's Import-RecipientDataProperty cmdlet.
The first question most IT folks would want to ask is— What's importing all those photos going to do to the size of my Active Directory database? And how much Active Directory replication traffic will this generate? The thumbnailPhoto attribute can accomodate photos of up to 100K in size, but the Import-RecipientDataProperty cmdlet won't allow you to import a photo that's larger than 10K. (Note, the attribute limit was stated as 10K earlier. This has been updated to state the correct value. -Bharat)
The original picture used in this example was 9K, and you can compress it further to a much smaller size - let's say approximately 2K-2.5K, without any noticeable degradation when displayed at the smaller sizes. If you store user certificates in Active Directory, the 10K or smaller size thumbnail pictures are comparable in size. Storing thumbnails for 10,000 users would take close to 100 Mb, and it's data that doesn't change frequently.
Note: The recommended thumbnail photo size in pixels is 96x96 pixels.
With that out of the way, let's go through the process of adding pictures.

A minor schema change

First stop, the AD Schema. A minor schema modification is required to flip the thumbnailPhoto attribute to make it replicate to the Global Catalog.
  1. If you haven't registered the Schema MMC snap-in on the server you want to make this change on, go ahead and do so using the following command:
    Regsvr32 schmmgmt.dll
  2. Fire up a MMC console (Start -> Run -> MMC) and add the Schema snap-in
  3. In the Active Directory Schema snap-in, expand the Attributes node, and then locate the thumbnailPhoto attribute. (The Schema snap-in lists attributes by its ldapDisplayName).
  4. In the Properties page, select Replicate this attribute to the Global Catalog, and click OK.

    Figure 1: Modifying the thumbnailPhoto attribute to replicate it to Global Catalog

Loading pictures into Active Directory

Now you can start uploading pictures to Active Directory using the Import-RecipientDataProperty cmdlet, as shown in this example:
Import-RecipientDataProperty -Identity "Bharat Suneja" -Picture -FileData ([Byte[]]$(Get-Content -Path "C:\pictures\BharatSuneja.jpg" -Encoding Byte -ReadCount 0))
To perform a bulk operation you can use Get-Mailbox cmdlet with your choice of filter (or Get-DistributionGroupMember if you want to do this for members of a distribution group), and pipe the mailboxes to a foreach loop. You can also retrieve the user name and path to the thumbnail picture from a CSV/TXT file.

Thumbnails in Outlook 2010

Now, let's fire up Outlook 2010 and take a look what that looks like.
In the Address Book/GAL properties for the recipient

Figure 2: Thumbnail displayed in a recipient's property pages in the GAL

When you receive a message from a user who has the thumbnail populated, it shows up in the message preview.

Figure 3: Thumbnail displayed in a message
While composing a message, the thumbnail also shows up when you hover the mouse on the recipient's name.

Figure 4: Recipient's thumbnail displayed on mouse over when composing a message
There are other locations in Outlook where photos are displayed. For example, in the Account Settings section in the Backstage Help view.
Update from the Outlook team
Our friends from the Outlook team have requested us to point out that the new Outlook Social Connector also displays GAL Photos, as well as photos from Contacts folders and from social networks, as shown in this screenshot.

Figure 5: Thumbnail photos displayed in the People Pane in the Outlook Social ConnectorMore details and video in Announcing the Outlook Social Connector on the Outlook team blog.

GAL Photos and the Offline Address Book

After you've loaded photos in Active Directory, you'll need to update the Offline Address Book (OAB) for Outlook cached mode clients. This example updates the Default Offline Address Book:
Update-OfflineAddressBook "Default Offline Address Book"
In Exchange 2010, the attributes in an OAB can be customized. This is done using the ConfiguredAttributes property of the OAB (see Set-OfflineAddressBook cmdlet). ConfiguredAttributes is populated with the default set of attributes, and you can modify it to add/remove attributes as required.
By default, thumbnailPhoto is included in the OAB as an Indicator attribute. This means the value of the attribute isn't copied to the OAB— instead, it simply indicates the client should get the value from AD. If an Outlook client (including Outlook Anywhere clients connected to Exchange using HTTPS) can access AD, the thumbnail will be downloaded and displayed. When offline, no thumbnail downloads. Another example of an Indicator attribute is the UmSpokenName.
You can list all attributes included in the default OAB using the following command:
(Get-OfflineAddressBook "Default Offline Address Book").ConfiguredAttributes
For true offline use, you could modify the ConfiguredAttributes of an OAB to make thumbnailPhoto a Value attribute. After this is done and the OAB updated, the photos are added to the OAB (yes, all 20,000 photos you just uploaded...). Depending on the number of users and sizes of thumbnail photos uploaded, this would add significant bulk to the OAB. Test this scenario thoroughly in a lab environment— chances are you may not want to provide the GAL photo bliss to offline clients in this manner.
To prevent Outlook cached mode clients from displaying thumbnail photos (remember, the photo is not in the OAB— just a pointer to go fetch it from AD), you can remove the thumbnailPhoto attribute from the ConfiguredAttributes property of an OAB using the following command:
$attributes = (Get-OfflineAddressBook "Default Offline Address Book").ConfiguredAttributes
$attributes.Remove("thumbnailphoto,Indicator")
Set-OfflineAddressBook "Default Offline Address Book" -ConfiguredAttributes $attributes

Import Exchange Global Address List (GAL) images into Active Directory (Part 1)

If you are using Outlook 2010 then you have probably noticed the ability for Outlook to display an image/photo for each user or contact in the Global Address List (GAL) – if you don’t know what this feature is, see here.
Import Exchange Global Address List images into Active Directory - AD PHOTO EDIT - Standard Results Import Exchange Global Address List images into Active Directory - AD PHOTO EDIT - edit image
As you will note from that article, the only method that Microsoft provides for importing images into the Active Directory attribute that Outlook 2010 pulls these images from is a PowerShell cmdlet that comes with Exchange 2010 (you don’t need Exchange 2010 for this to work). This cmdlet also limits you to selecting images that are less than 10 KB even though the thumbnailPhoto attribute in Active Directory is only limited to 100 KB.
So I decided to make a user friendly GUI for adding/removing/editing these images to Active Directory.

Donnerstag, 11. November 2010

SNMP unter Windows

Gerade in umfangreicheren Umgebungen wird ein Netzwerkmanagement auf Basis von SNMP erfolgen. SNMP dient nicht nur dazu, Router, Hubs und Switche zu überwachen, sondern kann auch dazu genutzt werden, Server und Dienste zu kontrollieren. Und genau das ist mit Windows möglich und damit auch mit Exchange.

SNMP einrichten

Windows NT bzw. Windows 200x kann schon von den ersten Tagen per SNMP abgefragt und auch beschrieben werden. Allerdings ist der Dienst nicht in der Standardinstallation enthalten. Sie müssen SNMP explizit über das Windows Setup nachinstallieren.
Der Dienst WMI SNMP-Anbieter erlaubt es, dass Programme über die WMI-Schnittstelle Anfragen an SNMP-Geräte weiter leiten können. Der umgekehrte Weg, dass per SNMP auch WMI-Befehle ausgeführt werden können, ist nicht möglich.

SNMP absichern

Durch die Installation des Dienstes ist prinzipiell der Zugriff auf SNMP des Servers möglich. Aber wie steht es mit der Sicherheit ?. Hier hat Microsoft mit jeder Version von Windows nachgebessert
BetriebssystemLesenSchreiben
WindowsNT4Public von jeder IP-Adresseprivate von jeder IP-Adresse
Windows 2000Public von jeder IP-Adressekein
Windows 2003Public nur localhostkein
Bei Windows NT4 war dann der Zugriff von jedem anderen System mit der Community "Public" möglich. Das ist bei Windows 2000 noch eingeschränkt wurden und bei Windows 2003 noch weiter abgesichert. Schließlich kann per SNMP auch geschrieben werden, d.h. Sie können per SNMP z.B. eine Netzwerkkarte "Administrativ Down" setzen. Daher müssen Sie SNMP über die Eigenschaften des Dienstes konfigurieren:
Sie sollten die Liste der SNMP-Hosts pflegen, die den Server abfragen dürfen. Per Default darf niemand den SNMP-Dienst bei Windows 2003 abfragen und es ist auch keine Community gepflegt.
Die Community ist quasi der Benutzernamen, der bei einer Anfrage zu übermitteln ist und der SNMP-Dienst daran erkennt, was der Anfragende darf. Es gibt aber kein Kennwort !!. Sie können nun eine eigene SNMP-Community eingehen, die kaum zu erraten ist, aber leider geht eben diese Community in Klartext über das Netzwerk. Daher ist SNMP in der Basisversion nicht als sicher zu betrachten.  Nutzen Sie daher wirklich die Möglichkeit, IP-Adressen der anfragenden Systeme zu beschränken.

SNMP mit Regedit und GPOs steuern

Nun werden Sie natürlich sich fragen, Wie man auf vielen Servern die Einstellungen synchronisiert. Hierzu kennt Windows 2003 mittlerweile auch die Funktion, diese Einstellungen per Gruppenrichtlinien einzutragen. Aber auch für Windows NT4 und Windows 2000 können Sie ähnliche Lösungen schaffen. Die Einstellungen von SNMP liegen in der Registrierung:
Entsprechend können Sie einen bestehenden Server konfigurieren und die Einstellungen mit REGEDIT exportieren und auf allen anderen Systemen importieren.
Für Windows 2003 können diese Einstellungen auch über Gruppenrichtlinien durchgeführt werden. Dazu sind aber zuerst die SNMP Erweiterungen zu aktivieren unter
User Configuration\Administrative Templates\Windows Components\Microsoft Management Console\Restricted/Permitted snap-ins\Extension snap-ins
Und Sie müssen die aktuelle system.adm eventuell erst noch importieren, damit Sie die Einstellung für SNMP angezeigt bekommen.
Administrative Templates\Network\SNMP

Trügerische Sicherheit

Die Einstellung von eigenen Community Strings und die Beschränkung der Zugriffe von bestimmten IP-Adressen ist nur ein kleiner Schutz, der aber leicht zum umgehen ist.
So sind die beiden Schutzmechanismen "Community" und "Hostliste" einfach zu umgehen:
  • Community String
    Diese werden meist per Klartext übertragen und sind damit von anderen Personen abhörbar.
  • Allowed Hosts
    Absendende IP-Adressen können einfach gefälscht werden
    Der Rückweg zum Angreifer kann über ARP-Spoofing ermöglicht werden
Wenn Sie daher zuverlässig verhindern wollen, dass unerlaubte Systeme auf SNMP zugreifen, dann müssen Sie diese auf ein eigenes Subnetz, VLAN oder z.B. per IPSEC absichern. Wenn Sie per SNMP aber nur einen lesenden Zugriff zulassen, dann müssen Sie selbst überlegen, wie schwerwiegend es ist, wenn ein fremdes System bestimmte Betriebsdaten per SNMP abfragt.

Rename Onedrive Business root folder

Rename Onedrive Business root folder Here is what I remember: In the Office 365 web admin pages, change the organization name to a shorte...