Find Jobs
Hire Freelancers

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

€30-250 EUR

Berlangsung
Dibuat lebih dari 4 tahun yang lalu

€30-250 EUR

Dibayar ketika dikirim
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 Proyek: 21800226

Tentang proyek

1 proposal
Proyek remot
Aktif 5 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan
1 freelancer menawar dengan rata-rata €160 EUR untuk pekerjaan ini
Avatar Pengguna
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 dalam 4 hari
5,0 (1 ulasan)
0,9
0,9

Tentang klien

Bendera FRANCE
Paris, France
5,0
10
Anggota sejak Mei 13, 2019

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.