<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Teknolojikadam - Blogs &#187; Local User</title>
	<atom:link href="http://www.teknolojikadam.com/index.php/tag/local-user/feed" rel="self" type="application/rss+xml" />
	<link>http://www.teknolojikadam.com</link>
	<description>exchange server, exchange 2010, exchange 2007, server 2008 r2, server 2008, server 2003, isa server, isa server 2006, sql, sql 2008 ocs, ocs r2, tmg, server, forefront, exchange, video, makale, sunum, windows, microsoft, exchange, sharepoint</description>
	<lastBuildDate>Wed, 21 Sep 2011 08:45:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Script ile local user açmak ve gruba eklemek</title>
		<link>http://www.teknolojikadam.com/index.php/script-ile-local-user-acmak-ve-gruba-eklemek.html</link>
		<comments>http://www.teknolojikadam.com/index.php/script-ile-local-user-acmak-ve-gruba-eklemek.html#comments</comments>
		<pubDate>Sun, 13 Dec 2009 21:34:48 +0000</pubDate>
		<dc:creator>Özgür Özocak</dc:creator>
				<category><![CDATA[Dökümanlar]]></category>
		<category><![CDATA[Gösterme]]></category>
		<category><![CDATA[Windows Scripts]]></category>
		<category><![CDATA[Local User]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[vb]]></category>

		<guid isPermaLink="false">http://www.teknolojikadam.com/?p=266</guid>
		<description><![CDATA[Bu script sayesinde bilgisayar üzerinde yeni bir local user account yaratılmış, bu local user account’a bir password atanmış ve account ilgili gruba member edilmiş olur. Bununla birlikte account için “password never expires” ayarıda enable olur yani password süresiz olarak geçerlidir. Script içerisinde strAccount, strPswd ve son bölümdeki Set objGroup satırında grup bilgisini düzenlemeyi unutmayın. ' [...]]]></description>
			<content:encoded><![CDATA[<p>Bu script sayesinde bilgisayar üzerinde yeni bir local user account yaratılmış, bu local user account’a bir password atanmış ve account ilgili gruba member edilmiş olur. Bununla birlikte account için “password never expires” ayarıda enable olur yani password süresiz olarak geçerlidir.</p>
<p>Script içerisinde strAccount, strPswd ve son bölümdeki Set objGroup satırında grup bilgisini düzenlemeyi unutmayın.</p>
<div class="kod-parcasi">
<pre class="brush:vb">
' specify account to create
strAccount = "Ozgur"
strPswd = "123456"

' get local computer name
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName

' check if local account already exists
intExists = 0
Set colAccounts = GetObject("WinNT://" &#038; strComputer &#038; "")
colAccounts.Filter = Array("user")
For Each objUser In colAccounts
    If objUser.Name = strAccount Then
     intExists = 1
  End If
Next

If intExists = 0 Then
   ' create local user
   Set colAccounts = GetObject("WinNT://" &#038; strComputer &#038; "")
   Set objUser = colAccounts.Create("user", strAccount)

   ' set pswd
   objUser.SetPassword strPswd
   objUser.SetInfo

   ' set pswd never expires
   Set objUser = GetObject("WinNT://" &#038; strComputer &#038; "/" &#038; strAccount &#038; ",User")
   objUserFlags = objUser.Get("UserFlags")
   objPasswordExpirationFlag = objUserFlags Or ADS_UF_DONT_EXPIRE_PASSWD
   objUser.Put "userFlags", objPasswordExpirationFlag
   objUser.SetInfo

   ' add to local admins group
   Set objGroup = GetObject("WinNT://" &#038; strComputer &#038; "/Administrators,group")
   Set objUser = GetObject("WinNT://" &#038; strComputer &#038; "/" &#038; strAccount &#038; ",user")
   objGroup.Add(objUser.ADsPath)
End If
</pre>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.teknolojikadam.com/index.php/script-ile-local-user-acmak-ve-gruba-eklemek.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

