Powershell Tweak

If you have ever noticed a lag with powershell, here is a way to speed things up.

Update-Gac.ps1

Below is the content of the Update-GAC.ps1 script that I run whenever I install a new version of PowerShell. Our installation is supposed to ngen the assemblies in the background. If that works, it doesn’t work fast enough for me. Also I’ve seen lots of examples where people run this script long after their install and things get a TON faster so …. The install team is looking into the issue but until then – here is the script I use:

Set-Alias ngen @(
dir (join-path ${env:\windir} "Microsoft.NET\Framework") ngen.exe -recurse |
sort -descending lastwritetime
)[0].fullName
[appdomain]::currentdomain.getassemblies() | %{ngen $_.location}

PowerShell Team Blog : Update-Gac.ps1

MOSS 2007: Hide Edit Page in Site Actions Menu

This always annoyed me.  Users with contribute rights are given the right to "Edit Page" under site actions.  This quick write-up resolves that issue by only providing that function to users with Full Control, rather than Contribute.  As always, be careful when modifying default.master and make sure you have backups readily available.

  1. Open the master page for the site.

  2. Find the following lines of code:
           <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
            Text="<%$Resources:wss,siteactions_editpage%>"
            Description="<%$Resources:wss,siteactions_editpagedescription%>"
            ImageUrl="/_layouts/images/ActionsEditPage.gif"
            MenuGroupId="100"
            Sequence="200"
            ClientOnClickNavigateUrl="BLOCKED SCRIPTMSOLayout_ChangeLayoutMode(false);"
            />

  3. Add to the following lines to the code:
    PermissionsString="ManageSubwebs"
            PermissionMode="Any"

  4. The code should now look like:
           <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
            Text="<%$Resources:wss,siteactions_editpage%>"
            Description="<%$Resources:wss,siteactions_editpagedescription%>"
            ImageUrl="/_layouts/images/ActionsEditPage.gif"
            MenuGroupId="100"
            Sequence="200"
            ClientOnClickNavigateUrl="BLOCKED SCRIPTMSOLayout_ChangeLayoutMode(false);"
            PermissionsString="ManageSubwebs"
            PermissionMode="Any"
            />

  5. Save the master page and login with an account that does not have Full Control, but is not read only either…  The Site Actions drop down should now resemble:

Hide Edit Page

Hide Edit Page in Site Actions Menu - The SharePoint Redemption

Windows Server 2008 Webcasts

windows-server-2008_1

With the official launch of 2008, Microsoft has also started a set webcasts in their "24 Hours of Windows Server 2008".  The series contains 24 sessions covering all aspects of Windows Server 2008.  You can check out and download the first session here.

 

Windows Server 2008 Core Commands

So you installed Server 2008 Core And here’s what you’ve got: Well now what?  To start, check out the commands below: Show NICs [...] Continue Reading…

Microsoft Virtualization Assessment and Planning Tool

  As part of their Solution Accelerator for Virtualization, Microsoft has released an assessment tool that will allow you to assess your IT infrastructure and take that [...] Continue Reading…

Windows 7 To Be Released Next Year?

Is Vista a bigger bust then Windows ME?  Could be seeing that there are rumors out there that "Windows 7" might be here sooner than expected. [...] Continue Reading…

PowerShell Script: Zip up a folder and email it

Cool method for scripting attaching a file and emailing using Powershell.  The script also displays how to zip up a destination using Out-zip.
$sender = sender@host.com
$recipient = recipient@host.com
$server = mail.host.com
$targetFolder [...] Continue Reading…

Powershell Script : Generate rdp-files from AD

NOTE:  this script requires the Quest Active Directory cmdlets

#generate-rdpfiles.ps1

$input = Get-QADComputer -ErrorAction SilentlyContinue -SizeLimit 0 | Where-Object { $_ .operatingsystem -match “Server” }

$RDPRoot = ‘C:\RDP-Files’

if ( -not ( Test-Path [...] Continue Reading…

Using Server 2008 as Workstation 2008

I found this useful list at:  The Way I See It Windows Server 2008 is the best OS to be released till date from Microsoft’s [...] Continue Reading…

Why all Vista users should upgrade to Windows XP

It is amazing how quickly Vista has failed, not only in the home, but more in the business.  The main problem with with the business side is that Windows [...] Continue Reading…