Find Jobs
Hire Freelancers

Powershell script for new account creation - reset password, send email and add to group

€30-250 EUR

진행 중
게시됨 4년 이상 전

€30-250 EUR

제출할때 지불됩니다
Hello, I'm looking to optimize and finish one of our scripts following need: Either on the event AD account creation or once per day with a search filter all new accounts need to: * Reset a password * add to a group * send an email to the new user. Accounts are created by an external system, so account creation is NOT needed. Just that the accounts are provisioned with a temp password which we don't know. And we would like to send a welcome email with a PDF attached to the newly created accounts. The trigger either being the Active directory account creation or in the morning with a scheduled task emailing all accounts created D-1 We have a basis, that you can use (or not): ##Beginning of functions Function Send-Email { Param ($Email, $Credential,$attachment) $From = "Hello@[login to view URL]" $subject = "Welcome to CompanyX" $SMTPServer = "[login to view URL]" $SMTPPort = "587" ### Beginning of email body $Body = "Hello New user!,<br><br>" $Body += "Welcome to CompanyX! <br><br>" $Body += " This email will help you log in to Workday and Azure update your personal information before you start. <br><br>" $Body += "Step 1. Enter your username (username)<br><br>" $Body += "Step 2. Enter your password $UserPassword <br><br>" $Body += " Please refer to the attached PDF for more information <br><br>" $Body += "<br><br>" $Body += "Looking forward to see you around,<br><br>" $Body += "CompanyX Corporate " ### End of email body Send-MailMessage -from $From -to $Email -Subject $subject -BodyAsHtml $Body -Attachments $attachment -SmtpServer $SMTPServer -Port $SMTPPort -Credential $Credential -UseSsl } ### End of Functions ##### Beginning of main function $When = ((Get-Date).AddDays(-1)) $UserName = "hello@[login to view URL]" #Gmail username which is used for sending an email $Password = Get-Content "C:\CareBears\[login to view URL]" | ConvertTo-SecureString #Reading a secure password from file and reversing it back into a secure string object $Credential = New-Object -TypeName [login to view URL] -ArgumentList ($UserName, $Password) #PSCredential for send-mail message cmdlet $Attachment = "C:\CareBears\[login to view URL]" #PDF sending as an attachment with email ### Not finished ---- WIP ### $UserPassword = Get-Random -maximum 20000 -Minimum 100 ### $UserPassword = "@" + "user" + $[login to view URL]() ### $UserPrincipalName = ($[login to view URL] + ”@[login to view URL]”) foreach ($EmailAddress in Get-ADUser -filter {(whencreated -ge $When)} -Properties emailaddress | Select -ExpandProperty emailaddress) #Iterating over each email of users { Send-Email -Email $EmailAddress -Credential $Credential -attachment $Attachment Write-Host "Email sent: $EmailAddress" } ### End of main function
프로젝트 ID: 21800226

프로젝트 정보

제안서 1개
원격근무 프로젝트
활동 중 4년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
1 이 프로젝트에 프리랜서들의 평균 입찰은 €160 EUR입니다.
사용자 아바타
Hi, I would like to work on this task and I will develop this in shell. I have five year of experience in this field. Please do let me know if we can discuss on this. Regards, Mayank
€160 EUR 4일에
5.0 (1 건의 리뷰)
0.9
0.9

고객에 대한 정보

국기 (FRANCE)
Paris, France
5.0
10
5월 13, 2019부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.