This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $Outlook = New-Object -ComObject Outlook.Application | |
| $Mail = $Outlook.CreateItem(0) | |
| $Mail.To = "[email protected]" | |
| $Mail.Subject = "Action" | |
| $Mail.Body ="Pay rise please" | |
| $Mail.Send() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Process.Start("explorer.exe", "/select," + <folder>); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Process[] processes = Process.GetProcesses(); | |
| foreach(Process process in processes) { | |
| Console.WriteLine("PID: " + process.Id); | |
| Console.WriteLine("Name: " + process.Name); | |
| Console.WriteLine("Modules:"); | |
| foreach(ProcessModule module in process.Modules) { | |
| Console.WriteLine(module.FileName); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) | |
| { | |
| // Get the subdirectories for the specified directory. | |
| DirectoryInfo dir = new DirectoryInfo(sourceDirName); | |
| DirectoryInfo[] dirs = dir.GetDirectories(); | |
| if (!dir.Exists) | |
| { | |
| throw new DirectoryNotFoundException( | |
| "Source directory does not exist or could not be found: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static string Version | |
| { | |
| get | |
| { | |
| Assembly asm = Assembly.GetExecutingAssembly(); | |
| FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location); | |
| return String.Format("{0}.{1}.{2}.{3}", fvi.ProductMajorPart, fvi.ProductMinorPart, fvi.ProductBuildPart, fvi.ProductPrivatePart); | |
| } | |
| } |
NewerOlder