Followers

Monday, June 22, 2020

Email powershell code



$Body = "Sample Email Body" 
$SmtpServer = 'smtp.gmail.com' 
$SmtpUser = 'madhu.hyp2011@gmail.com' 
$smtpPassword = 'M@dhu123@#' 
$MailtTo = 'madhu.hyp2011@gmail.com' 
$MailFrom = 'madhu.hyp2011@gmail.com' 
$MailSubject = "Testing Mail Attachments using $SmtpServer" 
$Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $SmtpUser, $($smtpPassword | 
ConvertTo-SecureString -AsPlainText -Force) 
Send-MailMessage -To "$MailtTo" -from "$MailFrom" -Subject $MailSubject -Body "$Body" -SmtpServer $SmtpServer -BodyAsHtml -UseSsl -Credential $Credentials 
write-Output "Custom Message : Attachment Email Sent to Business Users"  

Tuesday, June 16, 2020

Shared services Provisioning Report

/* Users Provisioned for access to the application */

select CSS_USERS.NAME,CSS_ROLE_LOCALES.NAME,APPLICATION_ID, MEMBER_IDENTITY, ROLE_IDENTITY, MEMBER_TYPE  FROM CSS_PROVISIONING_INFO, CSS_ROLE_LOCALES,CSS_USERS
WHERE LOWER(CSS_ROLE_LOCALES.IDENTITY_ID)= LOWER(CSS_PROVISIONING_INFO.ROLE_IDENTITY)
and CSS_PROVISIONING_INFO.APPLICATION_ID='HFM:DANACASH'
and CSS_ROLE_LOCALES.locale='en'
AND CSS_PROVISIONING_INFO.MEMBER_TYPE=1
AND lower(CSS_USERS.IDENTITY_ID)=lower(CSS_PROVISIONING_INFO.MEMBER_IDENTITY)

To get a list groups provisioned for access to an application, use the following SQL: -

/* Groups Provisioned for access to the application */

select CSS_groups.NAME,CSS_ROLE_LOCALES.NAME,APPLICATION_ID, MEMBER_IDENTITY, ROLE_IDENTITY, MEMBER_TYPE  FROM CSS_PROVISIONING_INFO, CSS_ROLE_LOCALES,CSS_GROUPS
WHERE LOWER(CSS_ROLE_LOCALES.IDENTITY_ID)= LOWER(CSS_PROVISIONING_INFO.ROLE_IDENTITY)
and CSS_PROVISIONING_INFO.APPLICATION_ID='HFM:DANACASH'
and CSS_ROLE_LOCALES.locale='en'
AND CSS_PROVISIONING_INFO.MEMBER_TYPE=2
AND lower(CSS_GROUPS.IDENTITY_ID)=lower(CSS_PROVISIONING_INFO.MEMBER_IDENTITY)

The consolidate ed list of users and groups provisioned for access to an application is as shown in the below SQL: -

/* Consolidated list of users and groups for an application*/

(
select CSS_USERS.NAME,CSS_ROLE_LOCALES.NAME,APPLICATION_ID, MEMBER_IDENTITY, ROLE_IDENTITY, MEMBER_TYPE  FROM CSS_PROVISIONING_INFO, CSS_ROLE_LOCALES,CSS_USERS
WHERE LOWER(CSS_ROLE_LOCALES.IDENTITY_ID)= LOWER(CSS_PROVISIONING_INFO.ROLE_IDENTITY)
and CSS_PROVISIONING_INFO.APPLICATION_ID='HFM:DANACASH'
and CSS_ROLE_LOCALES.locale='en'
AND CSS_PROVISIONING_INFO.MEMBER_TYPE=1
AND lower(CSS_USERS.IDENTITY_ID)=lower(CSS_PROVISIONING_INFO.MEMBER_IDENTITY)
)
UNION
(
select CSS_groups.NAME,CSS_ROLE_LOCALES.NAME,APPLICATION_ID, MEMBER_IDENTITY, ROLE_IDENTITY, MEMBER_TYPE  FROM CSS_PROVISIONING_INFO, CSS_ROLE_LOCALES,CSS_GROUPS
WHERE LOWER(CSS_ROLE_LOCALES.IDENTITY_ID)= LOWER(CSS_PROVISIONING_INFO.ROLE_IDENTITY)
and CSS_PROVISIONING_INFO.APPLICATION_ID='HFM:DANACASH'
and CSS_ROLE_LOCALES.locale='en'
AND CSS_PROVISIONING_INFO.MEMBER_TYPE=2
AND lower(CSS_GROUPS.IDENTITY_ID)=lower(CSS_PROVISIONING_INFO.MEMBER_IDENTITY)
)
To get the list of all users and groups provisioned for access in the Hyperion environment, use the following SQL: -

/* Consolidated access list for users and groups */
(
select CSS_USERS.NAME,CSS_ROLE_LOCALES.NAME,APPLICATION_ID, MEMBER_IDENTITY, ROLE_IDENTITY, MEMBER_TYPE  FROM CSS_PROVISIONING_INFO, CSS_ROLE_LOCALES,CSS_USERS
WHERE LOWER(CSS_ROLE_LOCALES.IDENTITY_ID)= LOWER(CSS_PROVISIONING_INFO.ROLE_IDENTITY)
and CSS_ROLE_LOCALES.locale='en'
AND CSS_PROVISIONING_INFO.MEMBER_TYPE=1
AND lower(CSS_USERS.IDENTITY_ID)=lower(CSS_PROVISIONING_INFO.MEMBER_IDENTITY)
)
UNION
(
select CSS_groups.NAME,CSS_ROLE_LOCALES.NAME,APPLICATION_ID, MEMBER_IDENTITY, ROLE_IDENTITY, MEMBER_TYPE  FROM CSS_PROVISIONING_INFO, CSS_ROLE_LOCALES,CSS_GROUPS
WHERE LOWER(CSS_ROLE_LOCALES.IDENTITY_ID)= LOWER(CSS_PROVISIONING_INFO.ROLE_IDENTITY)
and CSS_ROLE_LOCALES.locale='en'
AND CSS_PROVISIONING_INFO.MEMBER_TYPE=2
AND lower(CSS_GROUPS.IDENTITY_ID)=lower(CSS_PROVISIONING_INFO.MEMBER_IDENTITY)
)

Wednesday, June 10, 2020

Tuesday, June 9, 2020

HFM Documents Ownership change

While validating or working with Journal Reports, mainly with Private documents, do not save with different username or with admin user. Because it will save with that user and the user can't see that document with his login.

If it happened, we can update username back with backend table change/update.

Go to database -- execute below query

Formulae to create multiple queries:
=CONCATENATE("Update <ApplicationName>_RPTS Set CreatedUser ='",B1, "' where label = '",A1,"' and ReportType=1 and Private=1;")

Update <ApplicationName>_RPTS Set CreatedUser ='<username>@<domain>' where label = '<document name>'
and ReportType=1 and Private=1;

Not only Journal Reports, but we can also update any of the document username using the above method.


Thanks,
Madhusudhan