четверг, 15 июля 2010 г.

Получить список открытых файлов на удаленном сервере

http://sazonov.spaces.live.com/Blog/cns!C80884C5BEC6A15D!277.entry?wa=wsignin1.0&sa=508675381

Здесь собраны варианты, как получить список открытых файлов на удаленном компьютере.
Вариант 1. Используем WMI

$server = "server"
$command = 'cmd /k net file > c:\openfiles.txt'
([wmiclass]"\\$server\root\cimv2:Win32_Process").create($command)
Start-Sleep 2
Invoke-Item \\$server\c$\openfiles.txt
# Remove-Item \\$server\c$\openfiles.txt


четверг, 8 июля 2010 г.

Доступен для скачивания MDT 2010 Update 1

Что нового?

Для System Center Configuration Manager 2007:
  • New “User Driven Installation” deployment method. An easy-to-use UDI Wizard allows users to initiate and customize an OS deployment on their PCs that’s tailored to their individual needs.
  • Support for Configuration Manager R3 “Prestaged Media”. For those deploying Windows 7 and Office 2010 along with new PCs, a custom OS image can easily be loaded in the factory and then customized once deployed.
Для Lite Touch установки:
  • Support for Office 2010. Easily configure Office 2010 installation and deployment settings through the Deployment Workbench and integration with the Office Customization Tool.
  • Improved driver importing. All drivers are inspected during the import process to accurately determine what platforms they really support, avoiding common inaccuracies that can cause deployment issues.
А также:
  • A smooth and simple upgrade process. Installing MDT 2010 Update 1 will preserve your existing MDT configuration, with simple wizards to upgrade existing deployment shares and Configuration Manager installations.
  • Many small enhancements and bug fixes. Made in direct response to feedback received from customers and partners all around the world, MDT 2010 Update 1 is an indispensible upgrade for those currently using MDT (as well as a great starting point for those just starting).
  • Continued support for older products. MDT 2010 Update 1 still supports deployment of Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, and Office 2007, for those customers who need to be able to support these products during the deployment of Windows 7 and Office 2010.

Подробности: http://technet.microsoft.com/en-us/library/ee376932.aspx
Скачать: http://go.microsoft.com/fwlink/?LinkId=159061

Сценарий установки Native режима в Configuration Manager 2007

Сценарий используется службой Microsoft Advisory - удаленная техподдержка Майкрософта.

Цели:
# Planning, Installation and deployment of the Certificate Server for SCCM Native Mode
# Configuration of the Certificate Templates
# Configuring the Site Systems to run in native mode

Границы:
* Implementing Internet Clients
* Installation of the SCCM Site Server
* Fixing any existing issue

Вызов cmd скриптов во время MDT сессии

В статье(http://blogs.technet.com/b/deploymentguys/archive/2010/07/07/using-command-shell-scripts-with-mdt.aspx?wa=wsignin1.0) описаны способы правильного запуска скриптов, так как командная оболочка не поддерживает запуск скриптов из текущей директории в сети, а ссылается на %SystemRoot%\System32. Чтобы обойти это задаем переменную пути к скриптам:

set SCRIPTDIR=%~dp0
set SCRIPTDIR=%SCRIPTDIR:~0,-1%

Далее запуск осуществляется вызовом: "%SCRIPTDIR%\foo.exe"

Для вызова всех перемнных используемых в последовательности задач, можно использовать скрипт. Таким образом можно использовать следующую строчку:

for /F "tokens=1,2* delims==" %%i in ('cscript //nologo "%SCRIPTDIR%\EchoTSVariables.wsf"') do set %%i=%%j>nul

Для установки значений переменным можно использовать готовый, содержащийся в MDT скрипт ZTISetVariable.wsf:

cscript //nologo "%SCRIPTDIR%\ZTISetVariable.wsf" /VariableName:Foo /VariableValue:Bar

Ну и само логирование:

:LOGINFO

set INPUTTEXT=%*
echo %INPUTTEXT%
for /F "tokens=*" %%i in ('cscript //nologo "%SCRIPTDIR%\EchoDateTimeVars.vbs"') do set %%i>nul
echo ^<^^![LOG[%INPUTTEXT%]LOG]^^!^>^>>"%LOGFILE%"

goto :EOF

Определение файла лога по имени скрипта:

set LOGFILE=%LOGPATH%\%~n0.log
set MASTERLOG=%LOGPATH%\BDD.log
set COMPONENT=%~n0

Сами скрипты, использованные в статье тут: http://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-03-34-24-83/MDTCmdScript.zip