Показать сообщение отдельно
Старый 03.07.2011, 18:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
palleagermark: Find you SID
Источник: http://palleagermark.blogspot.com/20...d-you-sid.html
==============

If you restore the demodatabase for an AX 2012 image, you might need to know you SID in order to change your login in the AX database.

This script displays your SID and copies it to your clipboard:
Код:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set objAccount = objWMIService.Get _
("Win32_UserAccount.Name='Administrator',Domain='corp'")
Wscript.Echo objAccount.SID

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd.exe /c echo " + objAccount.SID + " | clip", 0, TRUE

Wscript.Echo "Your SID is copied to the  clipboard"
You may need to change the values for the user account name and the domain.

And this is the script you can use in the database:
Код:
update userinfo
set
networkdomain = 'YourDomain',
networkalias = 'YourAlias',
SID = 'YourSID'
where ID = 'Admin'



Источник: http://palleagermark.blogspot.com/20...d-you-sid.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Последний раз редактировалось Poleax; 04.07.2011 в 21:20. Причина: оформление