Kapalı

Writing a powershell script need help

Problem to solve:

I have a list of animals in a text file. called [login to view URL]

I need a script to be able to monitor this file for changes on an hourly basis.

when I modify this list, add or remove an animal and I run the script on demand it needs to tell me what I modified.

I have this so far:

#Get contents of the file

$list = Get-Content .\Desktop\[login to view URL] -Raw

#Dispaly contents

$list

#if file changed then do ????

if ($list -gt 3)

if name added then write-host "Sheep was added to the animal list"

if name removed then write-host "Cat was removed from the animal list"

I can find how in PowerShell you track changes to the files in the folder

But I do not know what syntax to use to track changes inside the text file itself.

And the script can not have any dependent libraries

help is highly appreciated.

Thank you

Beceriler: Kabuk Betiği, Powershell, PHP, XML, Yazılım Mimarisi

Müşteri Hakkında:
( 53 değerlendirme ) Siem Reap, Cambodia

Proje NO: #30764287

Bu iş için 18 freelancer ortalamada $23 teklif veriyor

(1132 Değerlendirme)
7.7
goodwork20k

Hello, I am a powershell expert and i can help you to make ps script Please ping me for further discussion thanks

$30 USD in 7 gün içinde
(111 Değerlendirme)
6.4
sabdsouza

Hello, I can provide your the shell script on linux, do let me know if I can assist you with this. Regards,

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(68 Değerlendirme)
5.5
dany3j

Hi there! Dear colleague. I can help you with this project. I would like to know more about it. Contact me by Chat to get more information. My Best Regards

$60 USD in 3 gün içinde
(60 Değerlendirme)
5.3
AhmadSameer

Hey there, Are you done with your project or not yet. I had developed tons of PowerShell scripts. I'm downloading the attached files to check. I can help. Regards!

$30 USD in 7 gün içinde
(24 Değerlendirme)
5.3
sachinparkhi17

Hey There, Greeting for the day... i am Microsoft and VMware certified Engineer with 12 years of experience on various technologies. I am Powershell expert... I can help you to prepare Script to complete your task.. Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(26 Değerlendirme)
5.0
hieuhoang117

Hello, I'm HieuHoang, a System Admin. I have 3-years of experience working with Powershell script relate Windows, Active directory, Office 365... I think I can help you complete it soon. Please consider and contact me Daha Fazla

$25 USD in 3 gün içinde
(6 Değerlendirme)
3.5
nithyarajeshg

I would like to take part in this project. I have 10+ years of experience in Powershell and in monitoring services. I have worked as a consultant in maintaining and monitoring servers for any new changes by creating Daha Fazla

$15 USD in 7 gün içinde
(25 Değerlendirme)
3.3
kzb

Hi there, I'm major in PowerShell and have done lot of PowerShell projects on Freelancer. Just text me and I can support you right now. Regards, kzb

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(7 Değerlendirme)
2.8
labsjasy

You can use compare object in PS. Should get you going.. Good luck Quotation can be ignored as it won't let me post it other wise

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(4 Değerlendirme)
1.4
Bharatgowdar

I have working experience in powershell script, python script,perl scripting as well with over system administration automation,windows administration, AD administration automation. Kindly initiate communication to sta Daha Fazla

$15 USD in 3 gün içinde
(1 Yorum)
0.6
techdca

I solved it for you, let me know if interested in the solution. I can give you the result of changes made to the file

$20 USD in 7 gün içinde
(0 Değerlendirme)
0.0
allanvictor01

I'm a experienced SysAdmin (10 years) and I already made this script. Please contact me if interested in the solution Go to my portfolio and you will see your script in action The script is already in my repository w Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
Bhatnitesh

Thanks for your job posting. I am very interested in your proposal and can complete this project as you need. As a professional in system engineer and expert in python, I have rich experience. I read your description c Daha Fazla

$16 USD in 2 gün içinde
(0 Değerlendirme)
0.0
nsr56d5537f2622d

Hi, I am interested in this. Please let me know for further discussion. I am AWS Certified Professional Solution Architect, having 7+ years of experience in AWS and Devops Technologies.

$30 USD in 4 gün içinde
(0 Değerlendirme)
0.0
ankitshah304007

Hello Sir/Ma'am, I am a SharePoint & Office 365 Architect, Administrator, Analyst, Development Lead, and migration expertise with 15 years of experience on MS Office 365, SharePoint, and other Microsoft technology and Daha Fazla

$20 USD in 7 gün içinde
(0 Değerlendirme)
0.0
TC490225

Using a compare-object2 script provided below and a while loop you can easily solve this.. :) [login to view URL] ..no this isn't a "dependent library" it's a functi Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
Anike01

We are a team of 50+ SEO professionals and developers. We offer SEO, Internet Marketing, Link Building, Marketing, Search Engine Marketing, Wordpress Development, Competitor Analysis and much more. On Page: Competitor Daha Fazla

$10 USD in 3 gün içinde
(0 Değerlendirme)
0.0