English 中文(简体)
是否可能将所有电脑在登台后送还
原标题:Is it possible to return all computers in AD in python

我怎么能寻找所有电脑名称?

最佳回答

我认为,在

问题回答

如果你对Windows AP I d建议使用“条形”栏目:www.o.org/www.o.org/french/sc/ctc 然而,这相当具有功能:

import subprocess

splitstring = "\r\n"
bCompList = subprocess.check_output([ dsquery ,  computer ,  domainroot ,
                                      -scope ,  subtree ,  -limit ,  0 ])
compList = str(bCompList)[2:-5].split(splitstring)

http://www.un.org/Depts/DGACM/index_french.htm 模块用于管理外部指挥;我建议。 (说明指挥是一份清单。) 这一点很重要!

在这种情况下,我们重新使用<条码>dsquery Computer查询所有计算机物体的全域(<条码>>域网<>>>>> (<条码>限额, 0)。 这张双轨迹——储存在<代码>b CompList。

既然是双轨扼杀,我们很可能想将其改为标准扼制格式,以便与我们一道工作——这就是为什么使用<条码>()。 我们可以使用斜体(b>>,其中表示胎体为双体,挂号为rn garbage.) 然后通过<代码>split(将其细分为清单。

顺便提一句,如果你想要在每一计算机标的旁边的引号dsquery Computer 上下的位置,则将斜体改为[3:-6],并改动splitstring = “/r/n”

但是,该法典有两个重要方面:

  • It must be run on a computer with the Windows "AD DS Snap-Ins and Command-Line Tools" feature installed (at least, that s what they re called in Windows Server 2008 R2.)
  • You need to be logged in as an AD user with appropriate privileges. (Alternatively, you could include -u , username, -p , password in the command argument list, replacing username and password with the appropriate credentials.)




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签