Wednesday, June 13, 2012

Some useful power shell commands


Copy DLL's From GAC

C:\Windows\assembly\GAC_MSIL\cd dllname
C:\Windows\assembly\GAC_MSIL\dllname\cd dllvirsion_dllpublickytoken(simply press tab after typing cd to get version and public key token)
C:\Windows\assembly\GAC_MSIL\dllname\dllvirsion_dllpublickytoken\copy dllname path_to_save


Set UIVersion for a site

$web = Get-SPWeb http://suinshr00002:666
  $web.UIVersion=3
  $web.Update()

set UI Version  for all sites of a site collection

$w = get-spweb http://sharepoint/sites/team/subsite
$w.webs | ForEach-Object {$_.UIversion = 4; $_.UIVersionConfigurationEnabled = $false; $_.update()} 

No comments: