Automated Method Of Getting Disk Space On All Servers And Putting It In A Txt Or Csv (or Even Excel) File Once A Week?
Aug 3, 2011[code].....
View 10 Replies[code].....
View 10 RepliesNeed to write a utility (either VB or perhaps a script?) to do the following:-to get the free disk space of all servers and append the results to a file
I have about 20 servers and it needs to check free space of chosen drives i.e. C, D and then append results to bottom of a spreadsheet or document showing computer (server) name, drive letter and the amount of free space
Tried it with WMI and works fine on local computer but doesn't seem to work across the network
I am using the following code to get the Disk I/O on various servers. For now I am just retrieving the DiskReadsPerSec to get a feel for it. The return data gives a uint32 for each drive on the server and a total. My questions is what is the time frame that this represents? Is this at the second that my code polls the drive or is this over the last few seconds or do I need to do multiple runs to get an average.
My intention is to build a graph for each drive so I wonder how often I need to poll the drive to get a acurate value.
Public Shared Function GetDriveIO(ByVal strip As String) As Boolean
Dim oConn As New ConnectionOptions()
Dim lnglist As New List(Of Long)
[Code]....
I want to save an excel file with the following prefix: Order-Monday for Mondays, Order-Tuesday for Tuesdays etc and then this file will be overwritten the next week. For the following bit of vb
lstrDateStamp = Now().DayOfWeek
xlWorkSheet.SaveAs(gstrFilePathS14 & gstrFileNameS14 & "-" & lstrDateStamp & gstrFileTypeS14)
the Now().DayOfWeek returns '5' apart from doing a case expression to decipher 1-7 as days of the week is there any other way I can get lstrDateStamp = DAY (i.e. Friday)
Im creating a program that auto starts with my computer. On this program im adding a section that states how much space i have left on the C: drive. So far i have 2 labels and a progress bar. in the top level i have the name of what the progress bar is, and the second below the progress bar states the amount such as this "430GB/740GB". i also want the progress bar to state the percent of how full this drive is. how can i do the following:
Determine the amount of drive space on C:
Determine the amount of free space on C:
Make free space a percent of all space. such as "30% full"
I don't really know how to code but am pretty good at tweaking. I'm trying to set up a script that I can run to delete a single file, multiple files, a folder or multiple folders on a list of servers.I was thinking that the script could read the files to be deleted from a .txt file and apply the deletion to a list of servers in another .txt file.Example:
FilesToBeDeleted.txt:
\(insert_server_name_from_list)c$Program FilesBINexample_file.rpt
or
[code].....
I was thinking will it be possible to get a disk space of a remote and local machine using asp.net 2008?
View 2 Replieswas thinking will it be possible to get a disk space of a remote and local machine using asp.net 2008
View 6 RepliesI'm developing a system info application. I've Searched all over internet and only found code for Free Hard Disk space, but not Total hard disk space.
The code should calculate the Total space of all the drives.
The following gives me an error when I try to open an Excel file if the value of lblFileName is different than the file on disk by differences of upper or lowercase letters.
[code]...
How can I tell what the size of my program is and how much disk space is needed to install. When I publish the program and install it on another machine it will show up in the control panel but does not show what size the program is?Also when I publish updates with it says something like installing 10mb. Is this an additional 10 mb everytime, I guess not, but can someone explain what it all means?
View 10 Replieshow to write a null bytes onto unused hard disk spaces? I understand that files deleted are still existed on hard disk, I am thinking of may be if I write the null bytes to every single unused bytes so that the unused hard disk space would be become all null bytes, and unused space would no longer contain of those deleted files.
View 9 RepliesI have a project that has a need to display a Excel file in second window, but because other controls are needed, simply launching excel is not sufficient. Right now I do not know if the target machines have excel installed but I know with certainty that if they do it would be 2010, is there any method or library that allows you frame your own form around an excel window?
View 1 RepliesI'm trying to automate writing some data to an Excel spreadsheet (Office 2010, VS 2010), save the spreadsheet, and then open the spreadsheet for the user to view and edit. When I save the spreadsheet, an instance Excel is left running in the Task manager. No matter how many spreadsheets I create, there is always instance in Task Manager left.[code]...
View 5 RepliesI am trying for the first time to automate Excel 2007 using VB.Net. I have VS 2008 Pro running on a machine with Windows XP 64-bit. All updates have been applied.
Like other posters, my problem started out with Excel.exe hanging up in the task manager, even after calling the Quit method. I have tried to recreate the suggestions of using the Garbage Collector and Marshal.FinalReleaseCOMObject methods. The problem that I get now is that after about 20 seconds during which I can still see EXCEL.EXE in the task manager, I always get the Microsoft message box stating: "Microsoft Office Excel has encountered a problem and needs to close." asking me if I want to send or not send a report.[code]...
i want to create an atomated excel files actually this software exceLINX ( my research software) build in excel files.then this exceLINX software is the main software to trigger my data acquisition equipment. thus
i need a coding in VB/macro to trigger the excel in the exceLINX software to start my measurement for the experiment.
I have both Excel 2003 and Excel 2007 installed on my system. When I call oExcel = CreateObject("Excel.Application"), Excel 2003 is used in the context in my .NET code instead of Excel 2007 (which I need to be used). I have referenced the "Microsoft Excel 12.0 Object Library" but when the code runs, the 11.0 version is used.
Is it because I am using Visual Studio .Net 2003 that Excel 2007 cannot be correctly referenced or do I need to change a reference or setting?
I've got a Word doc with insertion fields already created and an Excel spreadsheet with the data for a mail-merge.Does anyone have a code snippet for merging the two into a Word form-letter in VB.net?
View 2 RepliesI decided to to convert my excel macro in a exe file using visual studio 2010. In excel macro method find is present like this:
[Code]...
Right now I have a Email class that has all the properties of an email to send it, and then a SendEmail function which takes those properties and uses them in the following
Public Function SendEmail()
'Exception handling
Try
[Code]....
The loop goes through each email in the array to process its email, however with the multithreaded function I cannot call
"EmailArray(i).ThreadSendBatchEmail()"
So how do I call an objects method when its on a different thread?
And I'm making it multithreaded so I can easily pause the process, and because the program freezes when the send() function is working, this would resolve that.
Im struggling on how to open an excel workbook without one of two problems.
1. After the first workbook is opened and I close the workbook, if another is opened the worksheet area is "transparent", as in, you can see the desktop or any open app behind excel.
2. Closing excel and opening another workbook after X times (4+?) via the vb.net app I use causes the computer to reboot.
I am stuck thinking it is the method used to open excel within the app.The code below has two methods, both produce the same affect. One method is blocked (makes it easy to test either one).[code]I have two buttons that open workbooks, both have identical code less the workbook requirements.Is there a better or best method to use for opening excel workbooks from vb.net?
I need to generate a report that shows the 52 weeks of a year (or 53 weeks as some years have) and their start and end dates. There is an ISO spec to do this but seems awfully complicated! Im hoping someone knows of a way to do it in C# or Visual Basic (its actually for Visual Basic 6 but I will try port it across)
View 7 RepliesIn regular SQL i could do something like
SELECT * From T GROUP BY DATEPART(wk, T.Date)
How can i do that in Linq to SQL ?
The following don't work
From F In DB.T Group R By DatePart(DateInterval.WeekOfYear, F.Date)
Also don't work:
From F In DB.T Group R By (F.Date.DayOfYear / 7)
Conflict with Name Space Excel?
View 4 RepliesI am trying to creating a windows application that can automatically sign into a website and download a file. I have managed to get it to sign in and reach the file, however a windows pop up box appears asking if you want to open or save the file and then specify a location. How can I automate this part?
Basically I want to schedule this to run each morning and download the file without any manual intervention.
Imports System
Imports System.Windows.Forms
Imports System.Security.Permissions
Imports System.Net
[Code]....
How I can send file from server to another server in network??
View 2 RepliesHow would i get a certain text inside a textbox to equal that text space to space or null to space?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Textbox1.Text.StartsWith(Textbox2.Text + " ") And Not String.IsNullOrEmpty(Textbox2.Text) Then
Textbox1.Text = Textbox1.Text.Remove(0, Textbox2.TextLength)
Textbox3.AppendText("a")
End If
Btw: after i finish this step my project will be finished!
I was assigned a project to create a program of cloning two file servers. It will copy all folders (about 500, one day one folder, there are about 200 files in each day) from one file server (S1) to another file server (S2). If any error occurred while in processing, program will send an email to someone.
View 5 RepliesI am writing a code that downloads alot of information from different servers. Puts the information in an excel spreadsheet, saves the sheet, and uploads it to an FTP page for each server. The code is running into an OutOfMemoryException. Is there a way to clear the memory after each servers file is uploaded to the FTP?Or is there another way to fix the problem with out adding memory to the server the code is running on?
View 4 RepliesI'm working on a little script to automate tasks across 12 servers, that are all on the same domain and have a similar setup. The tasks are to create a new folder, to then copy contents off the network into it, and to create a virtual directory in IIS 6 pointing to it. Ideally I'd like to log errors but that's a later concern. My approach was to write a VB Script to connect to WMI on each server in an array, then use it to run off a batch file. While the VBS works if I tell it to create a folder directly, it does not run (any part of) the batch file, nor give me any errors.[code]...
View 2 Replies