Saturday, October 15, 2011

command line to use acldiag.exe/How to take a report on Active Directory (AD) delegation permissions per OU/Site/Group/object.

   Microsoft provides a free command line utility called acldiag.exe to by which we can generate a report like log based on the permissions and delegation assigned to Ou's/groups/objects in active directory.   we ca even give input from a text file if you need to take report on multiple Ou's. The text file must contains Ou names.    let's see that ... here we will see an example code to take permission report for multiple Ou's in a domain. the names of the OU's will be given to batch file through a text file. Download support tools from http://www.microsoft.com/download and install it in your computer. for /f %%a in (c:\users\delphin\desktop\list.txt) do ( acldiag "ou=%%a,dc=domain,dc=com" >>c:\users\delphin\desktop\log.txt ) Copy...

Friday, October 14, 2011

Run psexec.exe for list of computers stored in text file | batch file to ping a list of computers in a text file | Give input to command prompt from a text file

  Psiexec.exe is a nice, handy command line utility given by Microsoft through which we can run batch commands remotely to remote computer.   Consider a situation when you need to run a specific or a set commands to multiple no of computers remotely from your computer across your LAN.   This script described in this post will fetch computer names from a text file and run commands remotely with psiexec.exe command line utility...  Let's say that you need to renew ip address in many computers across your LAN, First thing you need to do is to download ps tools from http://technet.microsoft.com , extract the zip file and past all the files to c:\windows\syste32\ folder. Then copy the below command lines and paste to...

Thursday, October 13, 2011

C++ example program to write contents to a text file.

  Below is the simple c++ example program, to read contents from a text file stored in your computer's hard drive... #include<iostream.h> #include<fstream.h> void main() { char *name; int num; ofstream fileout; fileout.open("d:\\cpp\\pgm\\a.txt"); cout<<"Enter the name"<<endl; cin>>name; cout<<"Enter number"<<endl; cin>>num; fileout<<name<<endl; fileout<<num<<endl; fileout.close(); } Hope this helps..                                                                                                                                        ...

C++ example program to read contents from a text file.

  Below is the simple c++ example program, to read contents from a text file stored in your computer's hard drive... #include<iostream.h> #include<fstream.h> void main() { char *name; int num; ifstream filein; filein.open("d:\\cpp\\pgm\\a.txt"); filein>>name; filein>>num; cout<<name<<endl; cout<<num<<endl; filein.close(); } Hope this helps..                                                                                                                                          ...

Wednesday, October 12, 2011

backup all your photos and videos and status updates and comments uploaded in facebook.

  Are you those guys who spends most of the time on Facebook and upload loads of your photos and videos to it??   Then you must read this article. Facebook offers us to backup the items we uploaded to Facebook. There simple steps to do that.  Let see those steps... Step 1            login to your Facebook account, Click on the down arrow next to HOME button and select account settings In account settings click on download a copy of your Facebook data. In the next window click on Start my archive.. Then Facebook will start to archive your data. you need to wait for some time, once the archiving completed Facebook will send you an email with download link for your...

Monday, October 10, 2011

C++ example program to sort a string.

This program can be used to sort a string... /* String sorting */ #include<iostream.h> #include<string.h> #include<process.h> #include<conio.h> #define NULL 0 class string { private: char str[100][100]; public: void getstring(int); void display(int); void sortstr(int); }; void string::getstring(int n) { char temp[100]; for(int i=0;i<n;i++) { cout<<"Enter the String"<<endl; cin>>temp; strcpy(str[i],temp); } } void string::display(int n) { for(int i=0;i<n;i++) { cout<<endl<<"String "<<i+1 << ":" << str[i]; } } void string::sortstr(int n) { char temp[100]; for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(strcmp(str[i],str[j]) > 0 ) { strcpy(temp,str[i]); ...

C++ example program to perform string related operations like string copy, string compare, string merge, upper and lower..

  In this example, various string operations like string copy, string compare, string merge, string uppercase, string lower case.     Each operation is explained using separate function.   Copy and paste the below code in a text file, and rename it as filename.cpp... #include<iostream.h> #include<ctype.h> #include<string.h> #include<conio.h> class strhandle { private: char str[100]; public: strhandle(); void get_str(); void strcopy(); void strmerge(char[]); void strcompare(char[],char[]); void struppercase(); void strlowercase(); }; strhandle::strhandle() { str[0]='\0'; } void strhandle::get_str() { cout<<"Enter the String to copy"<<endl; cin>>str; } void...

C++ example program to sort the the array of elements.

  In this example, the algorithm to sort an array of elements is explained.   This program will compare the adjacent elements in a array and swap based on the result.   Copy and paste the below code in a text file, and rename it as filename.cpp ... /* program to Sort the Array*/ #include<iostream.h> #include<conio.h> class sort { private: int arr[100]; int val; public: void sortarr(); }; void sort::sortarr() { printf("How many values"<<endl; cin>>val; printf("Enter the Values"<<endl; for(int i=0;i<val;i++) { cin>>arr[i]; } for(int i=0;i<val;i++) { for(int j=i+1;j<val;j++) { if(arr[i] > arr[j]) { int temp=arr[i]; arr[i]=arr[j]; arr[j]=temp; ...

C++ example program to understand constructor and inheritance of objects.

  This post contains the c++ example code to understand constructors and inheritance... #include<iostream.h> #include<conio.h> class B { }; class D:public B { public: void msg() { cout<<"No constructors in base class and derived class"<<endl; } }; void main() { D objd; clrscr(); objd.msg(); getch(); } Hope this helps.                                                                                                                                     ...

C++ example program to perform arithmetic operations like addition, subtraction, multiplication and division.

   This post contains the c++ example code for performing arithmetic operations.    In this example, each arithmetic function is explained using separate functions.    Copy and paste the below code in a text file, and rename it are filename.cpp ... /* program to perform arithmetic operations*/ #include<iostream.h> #include<process.h> #include<conio.h> class Arith { private: int x,y; public: int add(); int sub(); int mul(); int div(); }; int Arith::add() { cout<<"Enter the x value"<<endl; cin>>x; cout<<"Enter the y value"<<endl; cin>>y; return(x+y); } int Arith::sub() { cout<<"Enter...

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons