bsharath
asked on
Distribution Group >Message Restrictions > Accept messages > Only From
Hi,
I have a distribution group.There are users who have permissions to send on behalf of that group.I need the names of the users to a file.
Distribution Group >Message Restrictions > Accept messages > Only From
Is there a way i can do this.
REgards
Sharath
I have a distribution group.There are users who have permissions to send on behalf of that group.I need the names of the users to a file.
Distribution Group >Message Restrictions > Accept messages > Only From
Is there a way i can do this.
REgards
Sharath
goto the group properties - members tab and you will find all the users there.
OR use dsget command for this purpose -
dsget group
Displays the various properties of a group including the members of a group in the directory. There are two variations of this command. The first variation allows you to view the properties of multiple groups. The second variation allows you to view the group membership information of a single group.
Syntax
dsget group GroupDN ... [-dn] [-samid] [-sid] [-desc] [-secgrp] [-scope] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}] [-part PartitionDN [-qlimit] [-qused]]
dsget group GroupDN [{-memberof | -members}] [-expand] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}]
Parameters
GroupDN ...
Required. Specifies the distinguished names of the group objects that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another command to input of this command. Compare with GroupDN in the next command variation.
-dn
Displays that distinguished names of the groups.
-samid
Displays the SAM account names of the groups.
-sid
Displays the group security IDs (SIDs).
-desc
Displays the descriptions of the groups.
-secgrp
Displays information about whether groups are security groups (yes) or a distribution groups (no).
-scope
Display information about whether group scopes are local, global, or universal.
GroupDN
Required. Specifies the distinguished name of the computer you want to view.
{-memberof | -members}
Displays the immediate list of groups of which the group is a member (-memberof). Displays the immediate list of members of the group (-members).
-expand
In the case of the -memberof parameter, requests that the recursively expanded list of groups in which the group is a member be returned. This option takes the immediate group membership list of the group, and then recursively expands each group in this list to determine its group memberships as well to arrive at a complete closure set of the groups.
In case of the -members parameter, requests that the recursively expanded list of members of the group be displayed. This parameter takes the immediate list of members of the group and then recursively expands each group in this list to determine its group memberships as well to arrive at a complete closure set of the members.
{-s Server | -d Domain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-u UserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:
user name (for example, Linda)
domain\user name (for example, widgets\Linda)
user principal name (UPN) (for example, Linda@widgets.microsoft.co m)
-p {Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first error.
-q
Suppresses all output to standard output (quiet mode).
-l
Displays entries in a list format. By default, entries are displayed in a table format.
{-uc | -uco | -uci}
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.
-part PartitionDN
Connects to the directory partition with the distinguished name of PartitionDN.
-qlimit
Displays the effective quota of the group within the specified directory partition.
-qused
Displays how much of its quota the group has used within the specified directory partition.
OR use dsget command for this purpose -
dsget group
Displays the various properties of a group including the members of a group in the directory. There are two variations of this command. The first variation allows you to view the properties of multiple groups. The second variation allows you to view the group membership information of a single group.
Syntax
dsget group GroupDN ... [-dn] [-samid] [-sid] [-desc] [-secgrp] [-scope] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}] [-part PartitionDN [-qlimit] [-qused]]
dsget group GroupDN [{-memberof | -members}] [-expand] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-c] [-q] [-l] [{-uc | -uco | -uci}]
Parameters
GroupDN ...
Required. Specifies the distinguished names of the group objects that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another command to input of this command. Compare with GroupDN in the next command variation.
-dn
Displays that distinguished names of the groups.
-samid
Displays the SAM account names of the groups.
-sid
Displays the group security IDs (SIDs).
-desc
Displays the descriptions of the groups.
-secgrp
Displays information about whether groups are security groups (yes) or a distribution groups (no).
-scope
Display information about whether group scopes are local, global, or universal.
GroupDN
Required. Specifies the distinguished name of the computer you want to view.
{-memberof | -members}
Displays the immediate list of groups of which the group is a member (-memberof). Displays the immediate list of members of the group (-members).
-expand
In the case of the -memberof parameter, requests that the recursively expanded list of groups in which the group is a member be returned. This option takes the immediate group membership list of the group, and then recursively expands each group in this list to determine its group memberships as well to arrive at a complete closure set of the groups.
In case of the -members parameter, requests that the recursively expanded list of members of the group be displayed. This parameter takes the immediate list of members of the group and then recursively expands each group in this list to determine its group memberships as well to arrive at a complete closure set of the members.
{-s Server | -d Domain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-u UserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:
user name (for example, Linda)
domain\user name (for example, widgets\Linda)
user principal name (UPN) (for example, Linda@widgets.microsoft.co
-p {Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first error.
-q
Suppresses all output to standard output (quiet mode).
-l
Displays entries in a list format. By default, entries are displayed in a table format.
{-uc | -uco | -uci}
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.
-part PartitionDN
Connects to the directory partition with the distinguished name of PartitionDN.
-qlimit
Displays the effective quota of the group within the specified directory partition.
-qused
Displays how much of its quota the group has used within the specified directory partition.
ASKER
Phadke_hemant
Fo this situation can ou give me the command?
Fo this situation can ou give me the command?
ASKER
Any help....
You want all the users of "Accept messages" group in file?
ASKER
Yes all users and groups if any.
Try following it will generate GroupMembers.txt file on C: drive root.
Click start -> Run -> Cmd.exe
DSQuery group -name "Accept*" | DSGet group -members >C:\GroupMembers.txt
Click start -> Run -> Cmd.exe
DSQuery group -name "Accept*" | DSGet group -members >C:\GroupMembers.txt
ASKER
I get this
C:\>DSQuery group -name "Accept*" | DSGet group -members >C:\GroupMembers.txt
dsget failed:`Target object for this command' is missing.
type dsget /? for help.
C:\>DSQuery group -name "Accept*" | DSGet group -members >C:\GroupMembers.txt
dsget failed:`Target object for this command' is missing.
type dsget /? for help.
"Accept messages" is a group or OU?
ASKER
When we right click a Distribution Group >Message Restrictions > Accept messages > Only From
There are many groups and users who have permissions to send a mail to that distribution list.I want to get all names from that group
There are many groups and users who have permissions to send a mail to that distribution list.I want to get all names from that group
You are talking about Active Directory or MS Exchange?
ASKER
I am talking about actie directory .When we click the group properties > Exchange general > Mesaage restrictions.Thsi option i present.This is a universal and security group.
Sorry mate, actually I don't see "Exchange General" tab in groups properties, I think this is because I don't have Exchange server in my Domain environment.
I searched through few sites to get some info about this and found similar question like you have asked.
I hope it will give you some idea.
https://www.experts-exchange.com/questions/22599482/I-am-looking-for-an-Exchange-or-Active-Directory-command-line-that-will-display-properties-of-a-distribution-list-more-specifically-who-has-access-to-send-to-distribution-list.html
Good luck
I searched through few sites to get some info about this and found similar question like you have asked.
I hope it will give you some idea.
https://www.experts-exchange.com/questions/22599482/I-am-looking-for-an-Exchange-or-Active-Directory-command-line-that-will-display-properties-of-a-distribution-list-more-specifically-who-has-access-to-send-to-distribution-list.html
Good luck
ASKER
Hi farhankazi,
Here the accepted answer is this.
What should i put here "ainscop002" is this the domain name,Ou name,Group name?
csvde -f N0.csv -d "CN=123test,OU=Test2,OU=Te st,DC=glob al,DC=ains ,DC=biz" -s ainscop002 -l "authOrig","displayName"
Here the accepted answer is this.
What should i put here "ainscop002" is this the domain name,Ou name,Group name?
csvde -f N0.csv -d "CN=123test,OU=Test2,OU=Te
-s ainscop002
Yes its domain / machine name. Its an optional parameter and you can omit that if you are running query on Domain controller.
Yes its domain / machine name. Its an optional parameter and you can omit that if you are running query on Domain controller.
ASKER
I get this
C:\>csvde -f N0.csv -d "CN=product directors,OU=user Responsibilities,OU=,DC=de v
elopment,DC=isoftgroup,DC= co,dc=uk" -s "product directors","displayName"
Connecting to "product directors,displayName"
The connection cannot be established
No log files were written. In order to generate a log file, please
specify the log file path via the -j option.
C:\>csvde -f N0.csv -d "CN=product directors,OU=user Responsibilities,OU=,DC=de
elopment,DC=isoftgroup,DC=
Connecting to "product directors,displayName"
The connection cannot be established
No log files were written. In order to generate a log file, please
specify the log file path via the -j option.
ASKER
This part should i specify anything
"product directors,displayName"
"product directors,displayName"
ASKER
Sorry to trouble you.
Is there any chance you can help me with this.
https://www.experts-exchange.com/questions/22635816/Match-users-with-machines-from-ADS.html
Is there any chance you can help me with this.
https://www.experts-exchange.com/questions/22635816/Match-users-with-machines-from-ADS.html
ASKER
Any help...
Can you please post here the results of following:
1) Copy few lines from the result and paste it here.
DSQuery * DC=DEVELOPMENT,DC=ISOFTGRO UP,DC=CO,D C=UK
2) Copy and paste the results of following:
DSQuery OU -name "Product*"
DSQuery Group -name "Product*"
DSQuery OU -name "User*"
DSQuery Group -name "User*"
3) Result of the command and contents of N0.csv file.
csvde -f N0.csv -d "CN=Product Directors,OU=User Responsibilities,DC=develo pment,DC=I SoftGroup, DC=co,dc=u k" -l "authOrig","displayName"
1) Copy few lines from the result and paste it here.
DSQuery * DC=DEVELOPMENT,DC=ISOFTGRO
2) Copy and paste the results of following:
DSQuery OU -name "Product*"
DSQuery Group -name "Product*"
DSQuery OU -name "User*"
DSQuery Group -name "User*"
3) Result of the command and contents of N0.csv file.
csvde -f N0.csv -d "CN=Product Directors,OU=User Responsibilities,DC=develo
ASKER
I get this.
C:\>DSQuery * ^\DC=DEVELOPMENT,DC=ISOFTG ROUP,DC=CO ,DC=UK^]
dsquery failed:A referral was returned from the server.
type dsquery /? for help.
C:\>DSQuery Group -name "Product*"
"CN=Product Development Managers,OU=User Responsibilities,DC=Develo pment,DC=i SOF
TGroup,DC=co,DC=uk"
"CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=c
o,DC=uk"
"CN=Product Management Group Authors,CN=Users,DC=Develo pment,DC=G roup,DC=co
,DC=uk"
CN=Product Development,CN=Users,DC=De velopment, DC=Group,D C=co,DC=uk
CN=Product Management,CN=Users,DC=Dev elopment,D C=Group,DC =co,DC=uk
"CN=Product Technology Services-SGR,OU=Security Groups,OU=IND,OU=Countries ,DC=De
velopment,DC=Group,DC=co,D C=uk"
"CN=Products-SGR,OU=Securi ty Groups,OU=IND,OU=Countries ,DC=Develo pment,DC=G
roup,DC=co,DC=uk"
"CN=Product Technology Services-SGW,OU=Security Groups,OU=IND,OU=Countries ,DC=De
velopment,DC=Group,DC=co,D C=uk"
"CN=Products-SGW,OU=Securi ty Groups,OU=IND,OU=Countries ,DC=Develo pment,DC=G
roup,DC=co,DC=uk"
C:\>DSQuery OU -name "User*"
OU=User Accounts,OU=IND,OU=Countri es,DC=Deve lopment,DC =Group,DC= co,DC=uk
OU=User Accounts,OU=DE,OU=Countrie s,DC=Devel opment,DC= Group,DC=c o,DC=uk
OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk
C:\>DSQuery Group -name "User*"
CN=UserAccountManagement,C N=Users,DC =Developme nt,DC=Grou p,DC=co,DC =uk
CN=Users,CN=Builtin,DC=Dev elopment,D C=Group,DC =co,DC=uk
"CN=Users-SGR,OU=Security Groups,OU=IND,OU=Countries ,DC=Develo pment,DC=G rou
p,DC=co,DC=uk"
"CN=Users-SGW,OU=Security Groups,OU=IND,OU=Countries ,DC=Develo pment,DC=G rou
p,DC=co,DC=uk"
No.csv file
DN (null)
CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk
C:\>DSQuery * ^\DC=DEVELOPMENT,DC=ISOFTG
dsquery failed:A referral was returned from the server.
type dsquery /? for help.
C:\>DSQuery Group -name "Product*"
"CN=Product Development Managers,OU=User Responsibilities,DC=Develo
TGroup,DC=co,DC=uk"
"CN=Product Directors,OU=User Responsibilities,DC=Develo
o,DC=uk"
"CN=Product Management Group Authors,CN=Users,DC=Develo
,DC=uk"
CN=Product Development,CN=Users,DC=De
CN=Product Management,CN=Users,DC=Dev
"CN=Product Technology Services-SGR,OU=Security Groups,OU=IND,OU=Countries
velopment,DC=Group,DC=co,D
"CN=Products-SGR,OU=Securi
roup,DC=co,DC=uk"
"CN=Product Technology Services-SGW,OU=Security Groups,OU=IND,OU=Countries
velopment,DC=Group,DC=co,D
"CN=Products-SGW,OU=Securi
roup,DC=co,DC=uk"
C:\>DSQuery OU -name "User*"
OU=User Accounts,OU=IND,OU=Countri
OU=User Accounts,OU=DE,OU=Countrie
OU=User Responsibilities,DC=Develo
C:\>DSQuery Group -name "User*"
CN=UserAccountManagement,C
CN=Users,CN=Builtin,DC=Dev
"CN=Users-SGR,OU=Security Groups,OU=IND,OU=Countries
p,DC=co,DC=uk"
"CN=Users-SGW,OU=Security Groups,OU=IND,OU=Countries
p,DC=co,DC=uk"
No.csv file
DN (null)
CN=Product Directors,OU=User Responsibilities,DC=Develo
OK try following:
Post whats the result of following:
DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk" Attr authOrig displayName
AND (check result.txt file)
DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk" Attr authOrig displayName >C:\result.txt
AND (check N0.csv file)
csvde -f N0.csv -d "CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk" -l "authOrig","displayName"
Post whats the result of following:
DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo
AND (check result.txt file)
DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo
AND (check N0.csv file)
csvde -f N0.csv -d "CN=Product Directors,OU=User Responsibilities,DC=Develo
ASKER
C:\>DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo
roup,DC=co,DC=uk" Attr authOrig displayName
dsquery failed:`Attr' is an unknown parameter.
type dsquery /? for help.
C:\>DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo
dsquery failed:`Attr' is an unknown parameter.
type dsquery /? for help.
No.csv file.
DN (null)
CN=Product Directors,OU=User Responsibilities,DC=Develo
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I get this.
C:\>DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk" -Attr authOrig displayName
authOrig displayName
I get this in the results file
authOrig displayName
C:\>DSQuery * "CN=Product Directors,OU=User Responsibilities,DC=Develo
authOrig displayName
I get this in the results file
authOrig displayName
>> Distribution Group >Message Restrictions > Accept messages > Only From
Are you sure "Product Directors" is the group name that has -> Message Restrictions > Accept messages > Only From.
Are you sure "Product Directors" is the group name that has -> Message Restrictions > Accept messages > Only From.
ASKER
Yes i am sure
What result do you get by applying following command?
DSGet Group "CN=Product Directors,OU=User Responsibilities,DC=Develo pment,DC=G roup,DC=co ,DC=uk" -members
DSGet Group "CN=Product Directors,OU=User Responsibilities,DC=Develo
ASKER
Every person i the organisation is a member in this group.So everyone will receive the mail