RRAS Dial-In Attribute

guys,
I'm trying to identify whether a user have "dial-in" permission set and if 
so what is the current value "Allowed" "Denied" or "Control access through 
Remote Access Policy". I can check AD attributes, such as mail, givenName, 
sn, etc, however, I can't seem to find the attributes to look for that 
relates to this. Can somone guide me here.

#This script connects to AD to find objects
$objADSI = [adsi]""
$domain = $objADSI.distinguishedName
$domainUsers = [adsi]("LDAP://" + $domain)

$search = New-Object System.DirectoryServices.DirectorySearcher
$search.Searchroot = $domainUsers
$search.Filter = "(&(objectClass=user)(givenName=Nik)(sn=Test))"
$search.SearchScope = "Subtree"

$results = $search.FindAll()
foreach ($item in $results)
    {
        $myUser = $item.GetDirectoryEntry()
        write-Host ($myUser.displayname + $myUser.mail)
    } 

0
Nik
1/20/2010 7:49:12 PM
windows.powershell 690 articles. 0 followers. Follow

1 Replies
4079 Views

Similar Articles

[PageSpeed] 18

I got it, its msNPAllowDialin, just in case anyone ever wanted to know

"Nik" <nalleyne@maxxam.lab> wrote in message 
news:uM7gEmgmKHA.1540@TK2MSFTNGP06.phx.gbl...
> guys,
> I'm trying to identify whether a user have "dial-in" permission set and if 
> so what is the current value "Allowed" "Denied" or "Control access through 
> Remote Access Policy". I can check AD attributes, such as mail, givenName, 
> sn, etc, however, I can't seem to find the attributes to look for that 
> relates to this. Can somone guide me here.
>
> #This script connects to AD to find objects
> $objADSI = [adsi]""
> $domain = $objADSI.distinguishedName
> $domainUsers = [adsi]("LDAP://" + $domain)
>
> $search = New-Object System.DirectoryServices.DirectorySearcher
> $search.Searchroot = $domainUsers
> $search.Filter = "(&(objectClass=user)(givenName=Nik)(sn=Test))"
> $search.SearchScope = "Subtree"
>
> $results = $search.FindAll()
> foreach ($item in $results)
>    {
>        $myUser = $item.GetDirectoryEntry()
>        write-Host ($myUser.displayname + $myUser.mail)
>    } 

0
Nik
1/20/2010 9:41:00 PM
Reply:

Similar Artilces:

specifying the encoding attribute explicitly
Hello, Using code below to create an xml file, how do I specifiy utf-8 encoding in the root element, ie create "<?xml version="1.0" encoding="utf-8"?> Thanks! ------------------------------------------- Dim xmlWriter As New XmlTextWriter("C:\inetpub\wwwroot\rss2\20061019\test.xml", Nothing) xmlWriter.Formatting = Formatting.Indented With xmlWriter .WriteStartDocument() .WriteStartElement("rss") .WriteAttributeString("version", "2.0") .WriteStartElement(&...

How can users select recipients by AD attributes?
Hello, We have populated many of the standard fields in Outlook and even added some custom fields of our own. How can our users select recipients using those fields, e.g., select all users by dept, without administrator intervention? We're using Outlook XP and Outlook 2003 with Exchange 2003. Thanks, - Alan. When you open the Address Book, there will be an Advanced Find link and menu option as well. Not sure if this was the case with your versions of Outlook already but it definitely is the case with Outlook 2007. If your users often make the same queries, your ma...

RRAS Dial-In Attribute
guys, I'm trying to identify whether a user have "dial-in" permission set and if so what is the current value "Allowed" "Denied" or "Control access through Remote Access Policy". I can check AD attributes, such as mail, givenName, sn, etc, however, I can't seem to find the attributes to look for that relates to this. Can somone guide me here. #This script connects to AD to find objects $objADSI = [adsi]"" $domain = $objADSI.distinguishedName $domainUsers = [adsi]("LDAP://" + $domain) $search = New-Object Syst...

more info for read only attribute
I currently run access 97 on a windows 98 OS. I am wanting to convert to access 2000 on a windows xp OS. I made a copy of my 97 mdb file. When I try to open on the windows xp machine using access 2000, that's when I get the message that the disc is a "read-only" and I can't seem to get that to change. please help. thank you very much. In article <027101c3cfdc$c6253db0$a101280a@phx.gbl>, "Wendy" <anonymous@discussions.microsoft.com> writes: >I currently run access 97 on a windows 98 OS. I am >wanting to convert to access 2000 on a wind...

Custom Attribute
Anyone know how to map a custom attribute to a regular field in exch 5.5? Plz post comments here. Thanks Shawn "Shawn" <anonymous@discussions.microsoft.com> wrote: >Anyone know how to map a custom attribute to a regular >field in exch 5.5? > >Plz post comments here. > >Thanks >Shawn Not sure what you mean. The custom attributes are there specifically as extras to the regular fields. Mark Arnold MCSA MCSE+M MVP, mark@mvps.org FAQ: http://www.swinc.com/resource/exchange.htm & http:http://www.swinc.com/resource/e2kfaq.htm >-----Original Messa...

trafficmanagement / logging with RRAS
Hello, I plan to use RRAS with windows2003. My idea is to connect some users using NAT to the internet. But I would like to have some kind of logging and trafficmanagement, so for example a logfile that shows what User (IP-Nr, Hostname) has connected to what website (URL). Also how much traffic a user (IP-Nr, Hostname) has generated. And: "disconnect" a user (IP-Nr) from the internet.... I think that all or some of these features I can find in a proxyserver (ISA..) - but a proxyserver would required that I set the proxy settings in the users' intenetbrowser - ...

Nillable Attribute Help Please
Greetings, I have a bit of XML I am looking at that puzzles me. <s:element [max occurs, minoccurs info here] name="MyElement" nillable="true" This is where I am puzzled. I looked up "nillable" but only got info on "nil" Nil states that if set to true that the value can't have content in it. If false the value must have content. This guy was generated WSDL that refers to a function that passes a parameter, where "MyElement" is the name of the parameter. It is not optional and requires a value (it is a string if that helps)...

Directory attributes
What code do I use to change directory attributes? -- Steve Wolstenholme Neural Planner Software EasyNN-plus. The easy way to build neural networks. http://www.easynn.com > What code do I use to change directory attributes? > Look at the code for this sample: http://www.codeproject.com/file/cfilemanip.asp --- Ajay Take a look at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/setfileattributes.asp Tom <steve@tropheus.demon.co.uk> wrote in message news:ms7ef2lo9l3sso9eq9a2ps98mjkumjc50d@4ax.com... > What code do I use to change directo...

RRAS problems
Hi This is a problem that occured after I installed a new Windwos Server 2008 R2 RRAS server, so the problem do didn´t exist when connecting agains RAS on a Windows Server 2003.... Background data: This is a NAP installation where I use Computer and user certificates för L2TP connection and authentication (via Radius). This works fine, until I try to connect with more than one computer from same external IP-adress. Then I get Error code 678 and after a while Error Code 756. As I said before, when I connect to the Windows Server 2003 RAS Server there is no problem when connecting wi...

Extracting part of a ldap attribute with an ldap query
Hi, I have a need to be able to extract only part of an attribute field using a single ldap query. For example, I need to return just the OPMAIL01 part from this string: /o=Options/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=OPMAIL01 Is is even possible to do this with an ldap query? Thanks. I would suggest looking into the topic of quering with WMI. "Bob" <ftoomch@hotmail.com> wrote in message news:44340c80$0$20636$5a62ac22@per-qv1-newsreader-01.iinet.net.au... > Hi, > > I have a need to be able to extract only part of an attribute field > ...

The age old debate of Attributes vs. Elements
Hi all, I have to decide on an XML structure going forward. The structure is going to house a large amount of data. In the past I've always just used the philosophy of "when in doubt use elements" - but I just read this article: http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnexxml/html/xml02212000.asp And there is some indication that you will gain performance benefits from XML that uses attributes rather than elements - example: <grandparent> <parent> <child> <name> tony </name> </child> ...

XPath Expression to retrieve attribute value without case sensitivity
Hey, I am struggling with how to form the XPath expression to find the value of an attribute value without case sensitivity. I have tried the following, but I must be missing something simple. "SOLUTIONS/SOLUTION[@id=*[translate(text(), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TESTSOLUTION']]" There exists an attribute id='TestSolution' on an <SOLUTION> element. Any help is greatly appreciated. Best regards, Bill Hey, Figured it out! "SOLUTIONS/SOLUTION[translate(@id, 'abcdefghijklmnopqrstuvwxyz',&#...

can't create schema for qualified attributes in element with default namespace
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a schema for it with Visual Studio, I get the error "Failed to create a schema for this data file because: Although this XML file is well formed, it contains structure that Data View cannot display. The 'http://tempuri.org/Source1.xsd:att1' atrribute is not declared. An error occurred at , (7,8)" However if I qualif...

XML Elements have the same attributes
Hello, I am creating an XML Document using XmlDocument. I can create my top node no problem However when I add child nodes they seem to inherit the xmlns="" attribute (see xml below). How can I stop this? ------------------------- Code snippet ------------------------- n = xmlDoc.CreateElement("nl", "MyXML", "http://www.myurl.com"); XmlAttribute nns = xmlDoc.CreateAttribute( "xmlns" ); nns.InnerText = @"www.myurl.com/xml";n.Attributes.SetNamedItem( nns ); xmlDoc.AppendChild(n); XmlNode TemplateNode; TemplateNode = xmlDoc.CreateEl...

Dial Tone Database?
Is it possible to create a Dial Tone Database on a different server from where the original storage group database resides I have server rooms at two sites. I have redundant domain controllers for our domain at each site. I want to create some redundancy for my exchange 2003 server. I have 1 exchange 2003 server at each site. One exchange server is not utilized yet. Let's say the server room that houses the production exchange server sets on fire and ruins the servers in there. Is there a way that I can get users up and running on the second exchange server I think that I am going ...

weight attribute
Hi, how can I add weight attribute to quote detail? I modify the template, but I don't know how create a link with the quantity field. I would create a field 'Total Weight' that dipend from quantity field. Thanks a lot, Paolo ...

some questions about RRAS configuration
Hello, I have to install a RRAS server under Win2003 R2 This will be used to connect a private LAN to the Internet using a permanent internet connection via an ISP Router What I have read so far about RRAS configuration assumed that the RRAS server was itself directly connected to the internet (one networkcard using Dial-Up...) But my environment is a ISP router to which I need to connect the RRAS server. So basically I need to do this: Client(PrivIP)---->(PrivIP)RRAS(PubIP)--->(PubIP)ISPRouter(PubIP)--->Internet The functionality needed on the RRAS Server i...

SBS 2003 RRAS/VPN issue
I've got a SBS 2k3 box, SP2. I believe it's Prem since I see SQL 2k5, but ISA isn't installed. The firewall in place is the NAT/firewall in RRAS for the internet interface. The internal server IP is 192.168.16.1. I can successfully establish a VPN connection remotely from an XP machine, and get an IP address. It looks to be from the DHCP range from the internal server (16.37 for example), dhcp enabled says no. It's PPTP. From there, I can't get on the internet, nor can I ping or access the server in any way shape or form. I am unsure if this used to w...

LDAP attributes for importing contacts
Hi, Sorry if this is not the correct discussion group. I am trying to import thousands of contacts into AD2003 so users can select them from the address list that I have created. Here are the fields I am using: DN,CN=paul smith,OU=Test Contacts,DC=SE,DC=TEST,DC=LOCAL ObjectClass,contact givenName,Paul mail,paul.smith@hotmail.com sn,smith DisplayName,smith paul company,Testing Co targetAddressSMTP:paul.smith@hotmail.com The contacts are created and all appear in address list filtered by company name. When I select the contact from AD computer and users right click send mail, mail is se...

How to code <A> target attribute
<a> <xsl:attribute name="href"> http://<xsl:value-of select="name" /> </xsl:attribute> <xsl:value-of select="thelink" /> </a> Here above is the code for <a> links getting transformed--I would like to know how code in target=_blank? TIA Aaron wrote: > <a> > > <xsl:attribute name="href"> > > http://<xsl:value-of select="name" /> > > </xsl:attribute> > > <xsl:value-of select="thelink" /> > > > > <...

RAS to RAS demand dial-in
How do I test this kind of connection. It's 3 different domains that need calendar sync. The main server has RAS set up to dial to the other two and keep the connection live. It works for one of the connections but not for the other one. I used the wizard to set them up. When I'm starting the non-working connection on the originating server I'm getting 647 The Account is Disabled. On the destination server I'm getting the following Remote Access events: The user connected from source IP but failed an authentication attempt due to the following reason: Authentication ...

RRAS vpn error 720
Kindly help since I have setup RRAS as a vpn server but when I am trying to connect from a vpn client I am getting error 720 I have enabled Microsoft CHAP version 2 on both sides but in vain from the event viewer it tells me that no network protocols were successfully negotiated and I have tried to connect from 2 different machines Thank you -- aconti ------------------------------------------------------------------------ aconti's Profile: http://forums.techarena.in/members/73272.htm View this thread: http://forums.techarena.in/active-directory/1305916.htm http:...

Can't apply XmlType attribute when impl. IXmlSerializable
Hello! I can't apply the XmlType attribute when I implement IXmlSerializable. There is an exception being thrown: Unhandled Exception: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: There was an error reflecting type 'Start'. ---> System.InvalidOperationException: XML attributes may not be specified for the type Start. The problem is, that without specifying XmlType, then I get this xml output: <?xml version="1.0" encoding="ibm850"?> <LandXml xmlns:xsd="http://www.w...

Stopping Auto dial up
How can I stop Outlook autodialing to connect to my ISP every time I open or sync with my PDA? Thanks ...

Outlook and Dialing Rules
Hey Everyone, We have a faxing application (Castelle Faxpress) where you can import fax numbers from Outlook contacts so you do not need to manually type in the name, company name fax # etc. The issue is Outlook (Seems to be every version) always assumes you want to dial a +1 in front of every number! I have verified my dialing and area codes are correct in Windows. Even the Windows rules say "the number to be dialed is xxx-xxx-xxxx" Windows will dial the number correctly. If I try to use the dial feature in Outlook it will append the number with +1 regardless of the Windows ru...