List and delete files using Windows PowerShell

|
To list files of specific type(s) on the disk or directory including all sub-directories
get-childitem c:\ -include *.tmp, *.temp, *.bak -recurse 
get-childitem D:\Projects\abc*\ -include *.bak -recurse 
The commands above will list on screen all files with extentions TMP, TEMP or BAK located on disk C:\ and all subdirectories or located on disk D:\ in directory PROJECTS and all subdirectories with name starting with ABC and their subdirectories.

Number of virtual processors in Hyper-V Guest Operating Systems

Article on Microsoft Tech Net with the latest information for the supported number of virtual processors and integration services when running different guest operating systems (virtual machines) on Windows Server 2008 R2 Hyper-v

http://technet.microsoft.com/en-us/library/cc794868(WS.10).aspx


|
2014/10/19 10:43

Hyper-V and BIOS settings

Hyper-V hardware requirement1. 64-bit (x64) processor and 64 bit Windows 2008 (R2) server2. Hardware Virtualization Assists
Enable in the system BIOS:- Intel VT-x (initially codenamed Vanderpool)
- AMD AMD-V (also called SVM and initially codename Pacifica)

3. Hardware Data Execution Prevention
Enable in the system BIOS:- Intel Execute Disable (XD)
- AMD No Execute (NX).
4. SLAT hardware - required for using RemoteFX, highly recommended for traditional server virtualization
|
2014/10/19 09:25

Create application log file in C# / Write to File example

Application log file example
private string logFile = "full path and file name (C:\\temp\\MyApplicationLog.txt)";
...
WriteToLogFile("your application message", logFile); // use any time to add record to the log file
...
public void WriteToLogFile(string strMessage, string outputFile)
{
   string line = DateTime.Now.ToString() + " | ";
   line += strMessage;
   FileStream fs = new FileStream(outputFile, FileMode.Append, FileAccess.Write, FileShare.None);
   StreamWriter swFromFileStream = new StreamWriter(fs);
   swFromFileStream.WriteLine(line);
   swFromFileStream.Flush();
   swFromFileStream.Close();
}


|
2014/10/19 08:55

SmartMarine 3D - Get list of deleted objects by user, date and time

DB platform: MS SQL server

Product: SmartMarine 3D, SmartPlant 3D (SM3D, SP3D)

Task: Get list of deleted objects by specific user or/and on specific date and time

A list of the deleted objects is avalable from project's Reports database ( xxxx_RDB ).


| |
2013/12/09 14:48

SmartMarine 3D - Show recent objects in the work space

Database platform: MS SQL server Product: SmartMarine 3D, SmartPlant 3D (SM3D, SP3D) Task: Show in the work space all objects created or edited recently For troubleshooting and for monito


| | | |
2013/12/09 14:48

C# Is the Logged User a member of specific Windows Domain Group?

C sharp code
using System.DirectoryServices.AccountManagement;
string userName = SystemInformation.UserName;
string UDN = SystemInformation.UserDomainName;
string domainUser = UDN + "\\" + userName;
PrincipalContext pc = new PrincipalContext(ContextType.Domain);
UserPrincipal user = UserPrincipal.FindByIdentity(pc, IdentityType.SamAccountName, domainUser);
GroupPrincipal group = GroupPrincipal.FindByIdentity(pc, "Domain_Group_Name");
bool is_member = user.IsMemberOf(group);

|
2013/10/19 11:10

Remote Desktop microphone redirection

Install and configure the microphone on the local PC and set redirection at Remote Desktop Connection 

Remote Desktop Connection microphone redirection



Allow audio recording at hostHKLM\SYSTEM\CurrentControlSet\Con
| |
2013/10/19 08:48

The Marine Design Forum discontinued

15 January 2013

Due to Tribon (M1, M2, M3) software retirement, the Tribon related marine design forum support has been discontinued.


|
2013/01/15 18:55