Jump to content

screwuphead

Members
  • Posts

    8
  • Joined

  • Last visited

Reputation

0 Neutral

About screwuphead

Personal Information

  • Location
    Chicago, IL
  1. I have two problems that relate. First lets start out with that i have, I have a single domain with active directory with dns. Yet i have the exchange server off site for various reasons (dont let other employees touch things they arnt supposed to when they dont understand them and they are critical). When i use SMTP locally to my external exchange server, i receive the emails just fine (it routes locally somehow?!). When i use the SMTP locally to a different email exchange server such as yahoo or gmail, i get an error and it wont allow me to relay the message. Then for another instance if i use a virtual smtp server in IIS and try to relay message to my exchange server i cannot receive it. YET! then when i try to relay a message from that virtual smtp i can receive message on my yahoo or gmail account. The only thing i can come up with is that there must be something weird going on with Active Directory or something. Cause i talked to the techs that host my exchange server and they opened up all the ports for me to allow me to test the relay and i still cannot receive messages (I know unsafe but it was just a test to see if there was something blocking it). PLEASE HELP!
  2. is there any security risks with spiceworks since its free? does it phone home at all?
  3. maybe i should of mentioned that this is going on a windows machine
  4. I know i could always buy a program to do this but wheres the fun in that? so I need a program that will go through a list of servers and then a list of their drives and check to see how much free space is left on those drives, from their if it is anything less then 30GB i need it to send an email to me. i am using psexec to access these remote servers and run cmd. then to email myself i am using postie. the problem i am having is wrapping that all up in a if-then-else command that will look for the specified free space. It doesnt work right now beacuse for whatever reason it is bring back a true statement when the statement is false because i know the server its checking is more then 30GB free. This is what i have so far: @echo off for /f %%S IN (serverPClist.txt) DO ( echo Checking drives on Server %%S... for /D %%D IN (C D F G H I J K X V E) DO ( psexec \\%%S cmd /c if exist %%D:\* dir %%D:\ | findstr /c:"bytes" > %temp%\%%S-%%D.txt ) ) color 0D for /f %%S IN (serverPClist.txt) DO ( echo. & echo. echo ********** Displaying output for server %%S... ********** for /D %%D IN (C D E F G I J K) DO ( for /f "tokens=1,2,3,4" %%F IN ('if exist %temp%\%%S-%%D.txt type %temp%\%%S-%%D.txt') DO ( if /i "%%G" == "Dir(s)" echo For the %%D: drive: %%H bytes free space. if /i "%%G" == "bytes" echo For the %%D: drive: %%F bytes free space. echo. ) ) echo Done! ) echo Generating HTML... REM this part of the script generates an HTML file with all the relevant information REM and then launches it using the default browser. set FileName="C:\Report.html" echo ^ > %FileName% echo ^ >> %FileName% echo ^ Free Space on NRCE Servers^ >> %FileName% echo ^ >> %FileName% echo ^ >> %FileName% echo ^ ^Free Hard Drive Space Report^^^ >> %FileName% for /f %%S IN (serverPClist.txt) DO ( REM mark the server echo ^^%%S^^^ >> %FileName% for /D %%D IN (C D E F G I J K) DO ( for /f "tokens=1,2,3,4" %%F IN ('if exist %temp%\%%S-%%D.txt type %temp%\%%S-%%D.txt') DO ( REM add a line for the drive and free space if /i "%%G" == "Dir(s)" echo ^Free space on ^%%D:^ drive: ^^ COLOR=GREEN^>%%H^ ^ bytes free^^ >> %FileName% if /i "%%G" == "bytes" echo ^Free space on ^%%D:^ drive: ^^ COLOR=GREEN^>%%F^ ^ bytes free^^ >> %FileName% ) ) REM mark some spacing lines into the HTML file echo ^ >> %FileName% ) echo ^ >> %FileName% echo ^ >> %FileName% REM launch the HTML file set positive=1 set amount="30,000,000,000" if %%f leq %amount% set violation=1 if %%h leq %amount% set violation=1 echo %violation% if %violation% equ %positive% postie -host:(SMTP SERVER) -to:(MY EMAIL) -from:(NETWORK EMAIL) -s:"Server Report" -msg:"THERE IS A VIOLATION!" -a:"C:\ServerReports\Report.html" echo Done! If anybody else has anything better plz show me, otherwise i will keep playing around with this coding.
  5. Actually kyle this is what i think would be better, if you had sync toy on the file server that you are saving the documents to and the login and logoff files call that program. This way not every user needs it. Then only the script needs to be on the computer. mostly if you got students who like to screw around with their computers and remove programs they think they dont need, in my case employees. Most people dont even know how to get to the GPO so they wouldnt miss with it. Just a thought.
  6. I have no idea what i did differently but i got it to run when playing around with it! yet i cant get it to run only a specific folder, it wants to run all tasks. Now i am also have the problem if when i logon it runs it...no program. but when logging out it only runs the scripts not the application so yea...
  7. When i ran the script it did not run the program. It just loaded it for me.
  8. Hey keep us up to date on this thing! because i am a network admin at a company and i would like to make a similar scripts so when people log on it syncs to their domain folder and when they log off it syncs again. this way they arnt pulling so much bandwidth off our main file server. I know offline folders works the same somewhat but still would like a different alternative to show the boss.
×
×
  • Create New...