tirsdag den 21. oktober 2014

Install DLL in GAC - Windows 2008/2012 (Using Powershell, No GacUtil.exe)

If you want to install a DLL in the GAC and do not have the GACUtil.exe available. Powershell is properly the easiest way to procede.

Before Powershell you would properly just drag the DLL file into the C:\Windows\Assembly but this option is usually not available anymore.

Powershell - Add DLL to GAC

So to install a DLL file in the GAC simply execute the below Powershell script. Remember you migth want to run the Powershell prompt as an administrator.
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            
$publish = New-Object System.EnterpriseServices.Internal.Publish            
$publish.GacInstall("c:\temp\MyDllFile.dll")            
iisreset

The first line adds a reference to the assembly we need to be able to mange the GAC.
The second and third lines retrives the GAC object and publish a new DLL file to it.
The last line resets the Internet Information Services. This is only needed if your DLL file is used in a website hosted in the IIS.

Powershell - Remove DLL from GAC

If you need to remove a DLL file from the GAC there is also a script for this.
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            
$publish = New-Object System.EnterpriseServices.Internal.Publish            
$publish.GacRemove("c:\temp\MyDllFile.dll")            
iisreset

mandag den 20. oktober 2014

Project Server Read only Custom Fields (Javascript)

PROJECT SERVER - Make Custom Fields Read Only

The fields on the PDPs (Project Detail Pages) is always editable unless you make them read only in a workflow stage or use the calculated field as suggested in my other post.

http://technicaltrix.blogspot.dk/2014/09/project-server-read-only-custom-fields.html
If you want to make a custom field read only without using aditional custom fields you have to do it through Javascript.
In the following i will explain how we can make custom fields read only through Javascript.

Insert a Content Editor webpart to the PDP page where the field you have the field that should be made read only.

Select the webpart and from the ribbon select HTML->Edit HTML Source.
Copy/Paste the following code into the Content Editor webpart.


<script type="text/javascript">
function makeReadOnly()
{
 var elements=document.body.getElementsByTagName("INPUT");
 for (index=0; index < elements.length;++index)
 {
  if(elements[index].type=="text")
  {
   if(elements[index].title=="Project Number") //Field name
   {
    elements[index].disabled=true;
   }
  }

 }
 setTimeout(makeReadOnly, 500);
}
setTimeout(makeReadOnly, 100);
</script>


Replace “Project Number” with the field you want to make read only.

Click OK and Stop Editing and the field name should be updated.
Now the field is read only when viewing the PDP.

lørdag den 18. oktober 2014

Windows 10 Start Apps in Full Screen


Launch Windows 10 apps in in full screen mode

If you recently have installed the Windows 10 Technical Preview on a tablet or computer system, you may have noticed that Windows Store apps run on the desktop now if you are using a system with mouse and keyboard.
I installed Windows 10 on my Surface pro one, but haven't seen any report saying the other models behave differently.
While it is still possible to enable the Start Screen interface, instead of using the Start Menu as you cannot use both it seems, apps that you run will run in Windows desktop mode by default.
That's not a big problem most of the time, but if you prefer to run some apps in full screen, Netflix or a game for example to get that extra bit of screen space this way, then you may have wondered how to make that happen.
There is no full screen option when you look at the window control icons in the top right corner of the screen. While you can use the controls to maximize the app window, it is still running in a window and not full screen.

To view an App in full screen mode simply select the tree dots in the left cornor of the App. Here you will see a few options:
Selecting the Full Screen option will display the App in full screen mode. To exit the full screen mode simply push the windows button.

I have not found any way to have all Apps automatically start in full screen mode. But I suppose the RTM release of Windows 10 will detect what device you are on (tablet/laptop/PC) and display the best setting for you.

søndag den 12. oktober 2014

Ask me anything...

In the comments section below feel free to ask me any questions related to Microsoft Project Server, Project Server Programming (VBA/PSI/CSOM/Powershell), SharePoint or Project Portfolio Management in general.

fredag den 10. oktober 2014

Project Server Budget/Financial Management

Have you ever tried to do budget mangement in Project Server without UMT's financial mangement plugin (UMT 360). This can be a complex task as you do not want a very detailed plan of the financial usage, but rather just track the approved budget from the steering comittee.

UMT 360 can do a lot of cool stuff with your financial data. But if your company are not ready for the full rollout of this module and just want to track if the projects and departments are on track a more simple solution could be the answar.

This is where Projectum's app "Project Financials" come into the picture.

This app simply adds a new area to your project page (PDP) which allows you to save the budget for the Project.


This can then be summed up and catagorized in some nice reports.


Try it out!!

torsdag den 2. oktober 2014

Powerpoint presentation viewer in SharePoint/Project Server

To have a Powerpoint presentation running on your SharePoint, Proejct Server or workspace site follow these simple steps.

 1. Copy the URL to the Powerpoint (located in a document lib in SharePoint)
Capture.PNG
 2. Insert a content editor webpart.
 3. In the HTML below, replace the file UID and the server name. 
 4. Insert the modified HTML into the webpart.
URL:
https://server/apps_products_and_concepts/_layouts/15/WopiFrame.aspx?sourcedoc=%7BF35655A3-7E70-41ED-A94C-75E9DBD24FF1%7D&file=Apps.pptx&action=default
HTML:
<iframe width="550" height="347" src="https://server/apps_products_and_concepts/_layouts/15/WopiFrame.aspx?sourcedoc={F35655A3-7E70-41ED-A94C-75E9DBD24FF1}&amp;action=embedview&amp;wdAr=1.7755102040816326&amp;Embed=1​" frameborder="0">This is an embedded &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a target=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;_blank&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39; href=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;http://office.com&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;Microsoft Office&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; presentation, powered by &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a target=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;_blank&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39; href=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;http://office.com/webapps&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#39;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;Office Online&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;.</iframe><br/>​