Tuesday, August 21, 2012

Windows 8

Поставил на работе релиз Windows 8 Enterprise из партнёрской поставки
МСДН. Впечатления положительные. Новый логотип кривых неразноцветных
форточек, правда, дурацкий.

Кнопки Старт и меню запуска теперь нет, иерархия меню запуска и ярлыки
заменены плитками, которые можно располагать как нужно. Клавиша Win
вызывает сейчас эти самые плитки. Кроме этого, справа всегда есть
пальцеориентированная контекстная панель. Я считаю интерфейс удачным
ходом МС.

С одной стороны система получилась как семёрка с приделанной
пальцеориентированной интегрированной мордой. Т.е. это всё равно
Windows, вызываешь рабочий стол и всё как было.

С другой стороны для планшетников удобно нажимать эти плитки пальцами.

И ещё сама система стала менее прожорливой. Я думаю, дешёвые
виндопланшеты пойдут на ура.

Thursday, August 2, 2012

Steely Dan - Any Major Dude Will Tell You

В последнее время слушаю Steely Dan. Это затейливый джаз-рок.
Гармоническия сочетания у них какие-то невозможные, но как звучит!
Вещи просто замечательные.

Можно взять The Definitive Collection +

Fire in the hole
Razor Boy
The Boston Rag
King of the world
Any Major Dude Will Tell You
Through with Buzz
Rose Darling


Any Major Dude Will Tell You
----------------------------

I never seen you looking so bad, my funky one;
You tell me that your super fine mind has come undone.

Chorus:
Any major dude with half a heart surely will tell you, my friend;
Any minor world that breaks apart falls together again.
When the demon is at your door, in the mornin' it won't be there no more.
Any major dude will tell you; any major dude will tell you.

Have you ever seen a squonk's tears? Well, look at mine.
The people on the street have all seen better times.

[chorus]

I can tell you all I know: the "where to go", the "what to do".
You can try to run but you can't hide from what's inside of you.

Проигрыш особенно нравится

http://www.youtube.com/watch?v=nUtZ2J6rNDw

===========================

Released as the B-side to "Rikki Don't Lose That Number," this fairly
obscure song has become a crowd favorite. In an interview with Rolling
Stone during Steely Dan's 2009 tour, Donald Fagen talked about this
song: "When we moved out to L.A., people called each other 'dude,'
which we found funny. We were trying to speak their language."

Regarding the lyrics, "Have you ever seen a Squonk's tears," a Squonk
is a mythical woodland creature who has the ability to dissolve in its
own tears. Steely Dan came across the word in a book by Jorge Luis
Borges. Genesis also makes mention of this animal in their song
"Squonk," from their 1976 album A Trick of the Tail.

2012 Olympic park map

Карта олимпийской деревни в Лондоне.

http://www.voanews.com/content/olympic-village-map/1446501.html

Exchange Server 2010 Architecture Poster

Стало уже почти традицией, что при выходе новой версии продукта МС
команда публикует постер, где объясняются новые возможности.

Постер по Exchange 2010 - это большая картинка, на которой изображены:

- Обзор архитектуры Exchange и как роли взаимодействуют друг с другом
- Обзор новых возможностей управления и мониторинга
- Обзор новых возможностей высокой доступности
- Подробная диаграмма роли клиентского доступа CAS
- Подробная диаграмма роли почтовых ящиков Mailbox
- Подробная диаграмма роли интеграции с телефонией UM
- Подробная диаграмма роли внешней почты Edge
- Подробная диаграмма роли почтового транспорта HT

Я вырезал диаграммы и сделал каждую на отдельной странице, чтобы можно
было напечатать на странице A4.

http://www.multiupload.nl/9ZCK5ISOXK (4,5 mb)

Большой постер здесь

http://www.microsoft.com/en-us/download/details.aspx?id=5764 (6 mb)

Friday, July 27, 2012

How to retrieve current TMG configuration from array nodes' registry and import it into new EMS array

How to retrieve current TMG configuration from array nodes registry -->

How to retrieve current TMG configuration from array nodes' registry and import it into new EMS array


Shabunin Anton, MCSE 2003, MCITP EA, MCT

27 Jul 2012 v 1.1

The only TMG EMS is lost, there is no TMG configuration backup. Now what?

Outline of steps needed to retrieve and restore TMG configuration if no backup is available

  • Install new EMS, make sure it has the same service pack and patches as array nodes;
  • Export current array configuration from array node's registry to XML using the export script below;
  • Create new enterprise config;
  • Create new array with the same name and DNS name as before;
  • Modify XML file which was exported from registry (add/remove/move XML elements according to the list below);
  • Import modified XML into new array using the import script below or TMG console;
  • Make configuration consistent - recreate/move lacking rules and objects (including enterprise-level ones), make sure that mission-critical rules have no unresolved object references and that configurations successfully backs up to XML file;
  • Reestablish configuration synchronization - change array's UUID in EMS LDS, so that it is the same as current array UUID in nodes' registry and wait for configuration to sync.

Export script - get current array configuration from array node's registry to XML

'Parameters
' 1 – xml file name to export. current date and .xml extension will be appended
' If it fails with error tmgexp_from_reg.vbs(41, 7) (null): The Server referenced by Reports Configuration Reports does not exist.
' The error occurred on object 'Reports' of class 'Reports Configuration' in the scope of array 'ARRAY'.
' Find current config tree in rem HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fpc\Storage
' (e.g. ActiveEffective - \EffecTree2) rem Go to rem HKEY_LOCAL_MACHINE\IsaStg_Eff2\Arrays\{array guid}\Reports\ReportingServicesProperties\Server
' and zero msFPCName there

' tmgexp_from_reg.vbs:
Sub ExportFromRegistry()
    ' Use this password
    pass="mypassword"
    'Declare the objects needed
    Dim root      ' The FPCLib.FPC root object
    Dim isaArray  ' An FPCArray object
    localDate = FormatDateTime(date(), 1)
    ' Create the root object.
    Set root = CreateObject("FPC.Root")
    ' VendorMode = true is optional, needed only if save to local storage is needed
    root.VendorMode = true
    'Connect root to local storage
    root.ConnectToLocalStorage
    ' Get a reference to the array object.
    Set isaArray = root.GetContainingArray()
    WScript.Echo "Exporting the configuration of the " & _
                     isaArray.Name & " array object to " & _
                     WScript.Arguments(0) & " " & localdate & ".xml" & " ..."
    isaArray.ExportToFile WScript.Arguments(0) & " " & localdate & ".xml",15,pass
    ' 15 = 1 + 2 + 4 + 8
    ' fpcExportImportPasswords (0x00000001)
    ' The optional data includes encrypted secret data, such as passwords or shared secrets that are used to create digital signatures for authenticating to RADIUS servers.
    ' fpcExportImportUserPermissions  (0x00000002)
    ' The optional data includes the security roles assigned to delegated administrators. The delegated administrators are identified by the security identifiers (SIDs) of their user accounts, which are included in this optional data. These SIDs, which are relevant to the workgroup or domain of the exporting computer, are not necessarily relevant to that of the importing computer.
    ' fpcExportImportServerSpecific  (0x00000004)
    ' The optional data includes server-specific information, which consists of cache drive settings and SSL certificates.
    ' fpcExportImportEnterpriseSpecific (0x00000008)
    ' The optional data includes information that is specific to ISA Server Enterprise Edition (available only in ISA Server Enterprise Edition).
    WScript.Echo "Exporting was completed successfully."
    WScript.Quit
End Sub
ExportFromRegistry

Modify XML file which was exported from registry

The following changes are required for registry-exported XML file to successfully import:
1.      no Enterprise element

FIX: copy Enterprise element with default policy from console-exported XML

2.      Enterprise networks are in Root/Arrays/Array/NetConfig/EnterpriseNetworks (5 default and the rest are custom)

FIX:  EnterpriseNetworks should be moved to Root/Enterprise/NetConfig  or else import will fail


3.      no enterprise policy assigned to array

FIX:  add Root/Arrays/Array/PolicyAssignment (before ConfigurationStorageServerConnection element) or else import will fail. UUID in <fpc4:Name... should be among the ones in Enterprise/Policies. UUID of default Enterprise policy is {aa53ce81-985c-4362-81cd-51a3e517742c}
<fpc4:PolicyAssignment StorageName="PolicyAssignment" StorageType="1">
                              <fpc4:Ref StorageName="EnterprisePolicyUsed" StorageType="1">
                              <fpc4:Name dt:dt="string">{Enterprise policy UUID here}</fpc4:Name>
                              <fpc4:RefClass dt:dt="string">msFPCPolicy</fpc4:RefClass>
                              <fpc4:Scope dt:dt="int">1</fpc4:Scope>
</fpc4:Ref>
</fpc4:PolicyAssignment>



4.      Security roles at Arrays/Array/AdminSecurity/DelegatedAdmins are different from those in LDS

FIX:  replace AdminSecurity element with default

<fpc4:AdminSecurity StorageName="AdminSecurity" StorageType="1">
            <fpc4:SecurityRoles StorageName="SecurityRoles" StorageType="1">
               <fpc4:SecurityRole StorageName="{e55f4cc7-84c9-48de-809d-8b0e4b34e4dd}" StorageType="1">

               <fpc4:Description dt:dt="string">Has full control over the array-level configuration for this array, including permissions to assign array roles. Has read-only access to the enterprise policy applied to this array.</fpc4:Description>
               <fpc4:Name dt:dt="string">Forefront TMG Array Administrator</fpc4:Name>
               <fpc4:Predefined dt:dt="boolean">1</fpc4:Predefined>
            </fpc4:SecurityRole>
            <fpc4:SecurityRole StorageName="{b59a032e-1018-4e3a-aaac-9c8a128cd0df}" StorageType="1">
            <fpc4:Description dt:dt="string">Has full access to array monitoring and read-only access to the array configuration. Has read-only access to the enterprise policy applied to this array.</fpc4:Description>
                 <fpc4:Name dt:dt="string">Forefront TMG Array Auditor</fpc4:Name>
                 <fpc4:Predefined dt:dt="boolean">1</fpc4:Predefined>
                 </fpc4:SecurityRole>
                 <fpc4:SecurityRole StorageName="{9c0bfea2-f463-438f-85d2-fcd9e81a9c94}" StorageType="1">
                 <fpc4:Description dt:dt="string">Has restricted access to array monitoring features. Can view sessions, view and reset alerts, query service status, and verify connectivity.</fpc4:Description>
                 <fpc4:Name dt:dt="string">Forefront TMG Array Monitoring Auditor</fpc4:Name>
                 <fpc4:Predefined dt:dt="boolean">1</fpc4:Predefined>
               </fpc4:SecurityRole>
              </fpc4:SecurityRoles>
        <fpc4:DelegatedAdmins StorageName="DelegatedAdmins" StorageType="1"/>
</fpc4:AdminSecurity>


5.      Full Arrays/Array/RuleElements/UrlCategorySets and UrlCategories
(optionally) FIX: replace full UrlCategorySets element with <fpc4:UrlCategorySets StorageName="UrlCategorySets" StorageType="1"/> and delete UrlCategories element

Import modified XML into new EMS array

If new EMS has different name and ip-address, first:
  • Redirect array nodes to new EMS using ChangeStorageServer.vbs;
  • Fix EMS name and address in XML file before import (replace "OLD_EMS_NAME" to "NEW_EMS_NAME"):
    • In "Remote Management Computers" computerset <fpc4:IPAddress and <fpc4:NameIn "
    • In "Enterprise Configuration Storage Servers"   domain name set
    • In "ConfigurationStorageServerConnection" Array element <fpc4:PrimaryConfigurationStorageServer ..
' tmgimp.vbs   -  Parameters
' 1 – xml file to import
' 2 – array name to import to
Sub ImportExport()
    ' Define a constant to indicate optional
    ' data to be exported or imported.
    Const OptionalData = 15
    'Declare the objects needed
    Dim root      ' The FPCLib.FPC root object
    Dim isaArray  ' An FPCArray object
    ' Create the root object.
    Set root = CreateObject("FPC.Root")
    ' Get a reference to the array object.
    Set isaArray = root.Arrays.Item(WScript.Arguments(1))
      WScript.Echo "Importing the configuration from " & _
                    WScript.Arguments(0) & " to the " & _
                    isaArray.Name & " array object ..."

    ' declare and define the optional data for the export method
    Dim iOptionalData: iOptionalData = OptionalData
     ' declare and define the TMG export data password
    Dim szPassword: szPassword = "mypassword"
    ' declare and define the TMG import policy overwrite flag
    Dim bOverwrite: bOverwrite = True
     ' declare and define the TMG import services reset flag
    Dim bReset: bReset = False
     ' declare and define the TMG import policy reload flag
    Dim bReload: bReload = True
     ' declare and define the TMG import file path
    Dim szInFilePath: szInFilePath = WScript.Arguments(0)
     ' enable script error handling
    On Error Resume Next
    ' try to import the configuration update from a file
    ' parameters - FILEPATH, optdata, password, overwrite, services reset, policy reload
     isaArray.ImportFromFile szInFilePath, iOptionalData, szPassword, bOverwrite, bReset, bReload
'     isaArray.ImportFromFile WScript.Arguments(0),noOptionalData,,,True
    If 0 <> Err.Number Then
        WScript.Echo "Failed to import the current array configuration from " & _
                      szInFilePath & "; " & Err.Number & "; " & Err.Description
      '  Exit Function
    End If
End Sub
ImportExport

Make configuration consistent

If imported enterprise rules have references to non-existent enterprise objects, when clicking on them console will error out. Configuration backup will also not work.
[Image]

  • Find the object by name in XML file, note its UUID
  • Find the object in LDS by UUID, make backup copy using ldifde:
    set cn=CN={Object UUID },CN=Protocols,CN=RuleElements,CN={Array UUID },CN=Arrays,CN=Array-Root,CN=FPC2
    ldifde -f "%cn%.ldf" -s localhost:2171 -d "%cn%"
  • Delete object from LDS 

 

Before recreating enterprise rules new enterprise policy should be created and assigned to array since Default Policy will not allow to create custom rules.
How to recreate enterprise rules:
·        Move needed rule elements from array level to enterprise level using array rule copy wizard (Right-click array, select “Copy Array Rule Elements…”;
·        Create enterprise rule (find it by name in XML file and see which components it uses).
You may try moving existing array rule to enterprise level:
  • Create new enterprise rule with any parameters;
  • Export it to XML rule file (the file will have the rule and all objects it references);
  • Replace
    <fpc4:Root \ <
    fpc4:Enterprise \ <fpc4:Policies \ <fpc4:Policy \ <fpc4:PolicyRules \ <fpc4:PolicyRule
    in XML rule file to
    <fpc4:Root \ <fpc4:Arrays \ <
    fpc4:Array \ <fpc4:ArrayPolicy \ <fpc4:PolicyRules \ <fpc4:PolicyRule
    from registry XML file
  • Import modified XML rule file back to new enterprise rule.

Reestablish configuration synchronization

Although configuration file was imported, array servers will not use EMS configuration. This is because new array UUID is different from the one stored in array nodes' registry. When XML file was imported array UUID was not overwritten.
If you change array UUID in LDS and match it with the UUID in node's registry, the node will recognize new array.
[Image]

[Image]

Be very careful to do it in production, since configuration from EMS will overwrite current registry configuration on array nodes.
ATTENTION! Before changing array UUID in LDS make sure that EMS configuration has all mission-critical rules, that these rules are valid and they do not have references to non-existent objects, and that configuration backs up successfuly! 

After some time array configuration from EMS will sync to array nodes and you will be able to manage the array.