I recently came across the Powershell quick reference guides for Powershell v3, ISE v3, tasks in Server Manager 2012 and also a document which provides several great examples. You can find further info at PowerShellMagazine
Enjoy!
I recently came across the Powershell quick reference guides for Powershell v3, ISE v3, tasks in Server Manager 2012 and also a document which provides several great examples. You can find further info at PowerShellMagazine
Enjoy!
Today a collegue came to me with his HP MediaSmart server. He accidentially disabled the network interface. Since the server does not have any video output he could not figure out how to enable the network interface again. I found the below information on the Internet:
1. Have a keyboard plugged before the Server is turned on
2. Turn on the Server
3. Wait until you hear almost no disk activity. This could take 10 or more minutes
4. Press [ESC] 2 or 3 times
5. Press [Ctrl+Alt+Del]
6. Hold down [Shift] then press [TAB] briefly 1 time
7. Type: administrator
8. Press [Tab] (again, 1 brief press)
9. Type: your server password
10. Press [Enter] and wait 5 minutes
11. Press [StartMenuKey] + [r]
12. Type: ncpa.cpl
13. Press [Enter]
14. Wait 60 seconds
15. Press [UpArrowKey]
16. Press [Enter]
Unfortunately it did not work. I assumed that I was logged into Windows and I did the following extra steps:
17. Press [StartMenuKey] + [r]
18. type cmd and press enter
19. wait 30 seconds
20. type netsh interface set interface “local area connection” ENABLED
21. press enter
After these steps the network interface was enabled.
Had some problems today with several DVD drives on HP DC7800 SFF desktop PC’s. The error code was 39. After some troubleshooting I found the solution. Here is the solution to the error code 39 issue.
In Dynamics one of our batch jobs should send out a mail to a speciffic user. This is the job I will use to do this.
static void SendMail(Args _args)
{
System.Net.Mail.MailMessage mailMessage;
System.Net.Mail.SmtpClient myMail;
System.Net.Mail.MailAddress toMail;
System.Net.Mail.MailAddress fromMail;
;
fromMail = new System.Net.Mail.MailAddress(“postmaster@domain.dk“);
toMail = new System.Net.Mail.MailAddress(“adam@domain.dk“);
mailMessage = new System.Net.Mail.MailMessage(fromMail,toMail);
mailMessage.set_Subject(“Enter the mail subject here”);
mailMessage.set_Body(“enter the mail body here”);
myMail = new System.Net.Mail.SmtpClient(“name of the smtp server”):
myMail.Send(mailMessage);
}
A few days ago I needed to create a new country layout for the project invoice in Dynamics. Here is a small guide how to create this setup. I will not describe how to modify the report/invoice. I will only describe how to setup the new report/invoice .
Step 1 – create the dispatcher class
Start by creating a new class named ProjInvoiceDispatcher_DK (or whatever country code you are creating the new layout for). This class must extend the class ProjInvoiceDispatcher_W.
final class ProjInvoiceDispatcher_DK extends ProjInvoiceDispatcher_W
{
}
Create a new method getMenuItemName as below
protected MenuItemName getMenuItemName()
{
return menuitemoutputstr(ProjInvoice_DK);
}
Step 2 – create the country specific report/invoice
Now create a copy of the existing project invoice reports. I used the report ProjInvoice_CZ and I renamed it to ProjInvoice_DK.
Step 3 – create an output menu item
Create an output menu item that points to the report created in step 2.
Step 4 – Modify the Base Enum ReportFormat_W
Add a new node named “Danish format”.
Step 5 – Setup Dynamics to use the new format
In the company that should use the new format go to Project/Setup/Forms/Form setup and select the invoice tab.
Select the new layout in the field “Country specific form”.
Step 6 – link the new dispatcher class
In order to activate the new setup a modification of the calss ProjInvoiceDispatch_W.construct() method must be made. Add the below code to the switch statement:
case ReportFormat_W::DanishFormat_DK :
dispatcher = new ProjInvoiceDispatcher_DK();
break;
That’s it. Now all you need is to modify the ProjInvoice_DK report so that it meets your layout requirements. Enjoy J
Recently my company started using Data Protection Manager 2010 which in my opinion is a superior product when it comes to backing up Microsoft products such as Exchange and MS SQL.
For a few months we have been backing up our MS SQL 2005 databases using DPM. I noticed that one of our large databases had a log file of 12 GB. Before using DPM a maintenance plan would backup the log and shrink the file weekly. After we started using DPM this has not happened.
So I started investigating how this should be handled when backing up the database using DPM 2010 and the answer was not as I expected.
If you only want the short answer then it comes here: You do not shrink the log file on a regular basis!
If the short answer is not satisfactory then continue on reading. To understand the reason that you should not shrink the log please consider the following analogy.
Your house has a leaking roof. You put a bucket for the water under the leak (the bucket is the transaction log). When the bucket is full you need to empty the bucket (the log file is full and you need to make a backup in order to truncate/empty the file).
Emptying the bucket will not reduce the size of the bucket (backing up the transaction log will not reduce the size of the LDF file).
If you for some reason wants to modify the bucket in order to make it smaller this can be done, but it will be quite time consuming. Furthermore the bucket will now fill more quickly and you will have a problem. You need to expand the size of the bucket making sure that no water is spilled. (You can shrink the log file but the log file will reach its limit more quickly and the file must be expanded. This is a time consuming operation).
I would choose a bucket that has a size so that it does not fill too quickly, but it also should not take up too many square meters of the floor in my house. (The log should be large enough so that auto growth is not necessary between log backups – but still the log should not take up all of the disk space – find a proper balance).
So my conclusion to my problem was that a log file of 12 GB was not an issue. The log was being truncated on a regular basis and the file size has so far not exceeded 12 GB. I have 200 GB of free space on the disk. So shrinking the file does not make much sense.
Check out msdn for further reading about transaction logs, truncating and shrinking files
I was writing some X++ today and I could not figure out how to use “NOT LIKE” in a select statement. I googled a lot but I did not find an anserw. After a while I figured it out. Here it is:
while select dataArea
where dataArea.isVirtual == NoYes::No && !(dataArea.id like ‘k*’)
{
}
I reinstalled my laptop (Lenovo T61) last week. There is nothing like a clean reinstalled PC!
After this I experienced a very annoying problem with Outlook 2007 and Word 2007. The mouse would simply stop working in the “edit area” of the programs. So if I needed to move the cursor, click on a link or copy some text etc. I would have to use the keyboard.
I googled a lot and found a lot of suggestions – most of them related to bad registry settings. None of them worked. I tried to repair Office 2007 and I tried to remove and reinstall Office 2007. That did not help either.
No add-ins were installed so this was not the problem.
Finally I cracked this one. It took me a few hours though. After reinstalling the laptop I decided that I wanted to try the IBM/Lenovo Client Security Solition. Could this software be causing the problem. I tried to disable this software and the problem was gone!
I went to lenovo’s site and found a patch for this specific error. You can download it here:
http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-74151
I have applied the patch and now Office works like a charm again. Hopefully this can save you a lot of time if you are experiencing lack of mouse support in your Office 2007 installation.
I have been testing an installation of Dynamics AX with the following setup:
SQL server
Windows 2008 R2 datacenter – 64 bit
MS SQL 2008 R2
AOS server
Windows 2008 R2 datacenter – 64 bit
Both servers are virtual and are running in a Microsoft Hyper V environment. The setup is not supported officially by several threads indicates that AX 4.0 will run fine in a virtual environment.
According to the Dynamics AX 4.0 system requirements this setup should be supported. The Dynamics AX kernel needs to be upgraded though according to the KB article 944115 (MBS customer source).
I did the upgrade and the AOS started fine. But when synchronizing the data dictionary the AOS crashed. I did a lot of investigation but I really never found an answer. Finally I found the kernel rollup in KB article 981007. I installed this kernel rollup and now the test installation is running smoothly on the setup.