Find Jobs
Hire Freelancers

Need help in powershell

$10-30 CAD

Completed
Posted over 3 years ago

$10-30 CAD

Paid on delivery
I need help in powershell commands. the person should have deep knowledge of powershell. The project is not that long. I want the below command to search from list of servere from a file [login to view URL] and see if server exits and if it does not this command should send me email. The below command is not working and your job is to make it working $usernamesend="**@gmail.**" $From = "**@gmail.**" $To = "**2@gmail.**" $Cc = " " $Subject = "$Server is not working" $Body = "Insert body text here" $SMTPServer = "[login to view URL]" $SMTPPort = "587" $secpasswd = ConvertTo-SecureString “emailpassword” -AsPlainText -Force $cred = new-object [login to view URL] ($usernamesend,$secpasswd) Function Test-Server { [CmdletBinding()] # Parameters used in this function param ( [Parameter(Position=0, Mandatory = $true, HelpMessage="Provide server names", ValueFromPipeline = $false)] $ComputerName ) $Array = @() ForEach($Server in $ComputerName) { $Server = $[login to view URL]() $SMB = $null $Object = $null $Status = $null $SMB = Test-Path "\\$server\c$" If($SMB -eq "True") { $Status = "True" $Object = New-Object PSObject -Property ([ordered]@{ Server = $Server "Is Online?" = $Status }) $Array += $Object } Else { $Status = "False" $Object = New-Object PSObject -Property ([ordered]@{ Server = $Server "Is Online?" = $Status Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential $Cred }) $Array += $Object } } If($Array) { return $Array } } Test-Server -ComputerName (Get-Content "C:\temp\[login to view URL]")
Project ID: 27842199

About the project

5 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I have already designed this kind of monitoring script to check after every interval if computer is not pinging then it will send an email alert to the configured email id. you can input all your windows servers in one file.
$30 CAD in 1 day
5.0 (11 reviews)
3.4
3.4
5 freelancers are bidding on average $26 CAD for this job
User Avatar
Hi, I work doing automation with powershell. I would like to participate in your project. please send me to chat to share details. regards
$30 CAD in 2 days
5.0 (9 reviews)
3.6
3.6
User Avatar
Hi, Now,I understand what you want. I have source code to send email. So,I can resolve your problem quickly I am available full time for your project. Please send the message to discuss the more details. I will be waiting for your reply.
$50 CAD in 1 day
5.0 (4 reviews)
3.0
3.0
User Avatar
I am full stack developer, had worked on php larvel, cake php, Javascript and Django. I have successful history in web development and web designing. I have developed multiple application and UI/UX and many logos and graphic designs. I am a professional do DM you will be satisfy
$10 CAD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I am a IT Infrastructure Service Delivery specialist , please check my profile for further details. Brief skill i have: KILLS AND COMPETENCIES TECHNICAL • IT Service Management • Service Level Management • Change and Configuration • Problem and Incident • Capacity and Performance • VOIP , Soft switches (Asterisk, VOS, Nextone) • VM and Thin Client/Server • Enterprise Architecture • Infrastructure Methodology • Technology infrastructure Assessment, Planning, and Implementation • Storage Management Planning and Methodology • Operational Assessment and Managed Care Outsourcing • Linux Administration • DC/Server Consolidation
$10 CAD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
Medicine Hat, Canada
5.0
4
Payment method verified
Member since Dec 9, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.