English 中文(简体)
Shutdown and WakeUp Script C#
原标题:

Hiya I am very new to C#, infact this is basically my first task set by work whilst i learn the language. Yes i am also new to programming, be gentle :).

Context: My script needs to query active directory, grab of OU s and put them to a combo box in a form. Next query ActDir for a list of machines in a selected OU (Done this in a vbscript already)

Next query the machines in turn for there IP, and MAC addresses.(Done this in a vbscript already) Next needs to shut those machines down(Done this in a vbscript already) and dump all the machine and NIC info to a txt file

The other half of the script grabs the info for the machines out of the text file and sends them a magic packet to wake them up.

The shutdown section i have already written a VBscript for, but decided it wasn t future prrof, and i was learninc C# at home, so figured it was the best option to start over with.

Im not looking for anyone to write this for me, but if anyone had any pointers on where to go for information etc. . . It would be more than appreciated :)

最佳回答

MSDN has all the information you need. Your AD stuff should be covered pretty well in the System.DirectoryServices namespace, the other stuff you can get using COM or P/Invoke.

However, to get more help here, you need to ask more specific questions. Unclear/unspecific questions often do not last long and are closed as "not a real question".

问题回答

暂无回答




相关问题
WPF Datagrid, Setting the background of combox popup

I would like to change the color of the popup background when using a DatagridComboboxColumn in the WPF Toolkit datagrid. I ve edited the Template for a normal Combobox and it works great for selected ...

How to insert ComboBox item into ListBox? [winforms]

The question is very simple, How to insert ComboBox selected item into ListBox using c#? I have tried with this: listbox.Items.Add(combobox.SelectedItem); and some other permutations but it always ...

How do I bind a ComboBox to a one column list

I ve seen how to bind a ComboBox to a list that has columns like this: ItemsSource="{Binding Path=Entries}" DisplayMemberPath="Name" SelectedValuePath="Name" SelectedValue="{Binding Path=Entry}" But ...

Wpf Combobox Limit to List

We are using Wpf Combobox to allow the user to do the following things: 1) select items by typing in the first few characters 2) auto complete the entry by filtering the list 3) suggesting the first ...

热门标签