Commodore
Commodore
756 views

Changing the email address for all users - scripts

Hi.

So we are a group where some of us are **PERSONAL INFORMATION REMOVED**

 

We want to change so everyone is **PERSONAL INFORMATION REMOVED**  Changing the domain name we can make the new one the default for all users in internet addressing i think?  even if we have to do it manually not the end of the work.

 

But it's the blah_blah to blah.blah 

 

I know in internet addressing / Address formats the preferred address format is firstname.lastname

and we have ticks in first.lastname@ and lastname.firstname@

So i'll do tests but for a decent portion of the group they might actually receive the emails.  But we need to change the default email address which we have overridden by putting a tick in the settings and changing to first_surname@

So we need to change all for first.last but create a nickname for each user that is their first_last so they get those emails as well is there a way to script this through the api or will i just have to manually change everything.  

 

Also some of the users are set to be known in one domain only is there a script i can run or api export that shows if they have only known in this domain ticked?

 

Thanks for any ideas.

0 Likes
6 Replies
Micro Focus Expert
Micro Focus Expert

@booktrunk   Hi,

With regards to objects having "known at this domain only" ticked, there first needs to be an internet addressing override set. 

I created the attached for a slightly different purpose, but if you take the attached .txt file and change it to a .sh file and make it executable (assuming Linux server) and run it, it will loop through all objects that have internet addresses (users, nicknames, resources, etc.) and will create an output.csv file listing all objects that have an internet addressing override set for the domain name that you enter when prompted while running the script.

Cheers,

Laura

 

 

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...
Commodore
Commodore

Thanks. That a useful script.
Tweaking it just to add so it says if they are a user / resource / etc... so i know what's what.

Yeah the override is set, we also have fun as we have two users at times on different domains using the same email address **PERSONAL INFORMATION REMOVED** and **PERSONAL INFORMATION REMOVED** which are separate mailboxes, and a **PERSONAL INFORMATION REMOVED** i don't think i'm going to have to manually mess around with all of them 🙂
0 Likes
Commodore
Commodore

So i downloaded the 4 lists in full without any options to see the fields and that was userful  So now i can tweak your script to show the fields i want. 

So i've got the 4 separate files with all the info in which is useful.

My challenge is to find those that have known at this domain only ticked.  Irrespective of if it's a user / group / recourse / nickname.

The lists in full when i download them don't appear to show a field showing all the allowed addresses for the item.

Our new domain i've added it and anyone who of course doesn't  have a tick in only known in this domain will get email to the new domain so it's a way of finding those users as they are the ones i need to concentrate on first. as i'll need to make new aliases for all of them.  Even if it's just a list showing each preferred address, and all the allowed addresses, then i can just look through and any in the list that have the one address BINGO! they are the ones i need to concentrate on.

AllowedAddressFormat isn't it i thought it might be, but that shows blank for lots of accounts irrespective if they can receive to just the one or to multiple addresses.

It's this one flag i'm trying to identify. 

0 Likes
Commodore
Commodore

When I browse to it and do:-

https://*.*.*.*:9710/gwadmin-service/list/RESOURCE

Then scroll through them... Looking for an account I know it specifically only known by one address.  I found this..... in the /xml but i don't seem to see that in the resource.csv file in the list of headers if i download the list without any options.

<exclusive>true</exclusive>

 

0 Likes
Commodore
Commodore

So doing the script and adding exclusive on the end of the attrbutes to get that doesn't work as it doesn't seem to be in the blah.csv file.

0 Likes
Commodore
Commodore

Got it. 

just open the XML Lists in a browser.

https://*.*.*.*:9710/gwadmin-service/list/USER For example.

Then in webpage, right click and save page as xml. 

Then just open that page in Excel and it asks to import / create the table layout you just tell it to try creating it itself and you have a nicely formatted list.

So: USER , RESOURCE, GROUP, NICKNAME, gives me all I need and GROUP_MEMBER is also useful to see who's in what group.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.