Archive for December, 2009

Posted by IsaacBlum at 31 December 2009

Category: Uncategorized

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
###############################################################################################################
##Deactivate a Feature on all Sites for a web application ###
## http://Blog.IsaacBlum.com ##
###############################################################################################################
###############################################################################################################
 
 
 
#Create function deactivatefeature
function deactivatefeature{
 
## Reference to SharePoint DLL
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
 
## Location of sharepoint STSADM utility program, You may need to change this
$stsadm = "$env:programfilesCommon FilesMicrosoft SharedWeb Server Extensions12BINSTSADM.EXE"
 
#Ask for WebApp Root url to enumerate
$url = Read-Host "Please enter root url of WebApplication"
 
#Enumerate available features in SharePoint Farm
write-host -foregroundcolor green " Below are the available features in SharePoint Farm"
&stsadm -o scanforfeatures
 
#Ask for Feature Name
Write-Host "Please enter feature name that will be deactivated at all Sites and Sub-Sites of the specified application"
$feature = Read-Host "do not add the feature.xml. ex: NewsGator.SocialSites.SiteSkin"
 
#Returning info for use in remainder of script
$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($url)
 
#List Sites Affected
write-host -foregroundcolor green " The feature will be deactivated on the following Sites:"
foreach ($site in $webapp.Sites) {
#        write-host $webapp.Name
	foreach ($web in $site.AllWebs) {
        write-host $web.URL
		}}
 
##Actvate Feature on all Sites
foreach ($site in $webapp.Sites) {
	foreach ($web in $site.AllWebs) {
    	$sResult = &stsadm -o deactivatefeature -name $feature -url $web.URL -force
		if(($sResult -like "*Operation completed successfully*")){ write-host -foregroundcolor green "Feature Deactivated : "$web.URL}
   		else {
      			Write-Host -ForegroundColor "red" -BackgroundColor "white" "Deactivate of feature '$feature' for" $web.URL "Failed! `n $sResult"
	}
    }
	}
 
}
 
 
 
 
###############################################################################################################
###############################################################################################################
###############################################################################################################

Posted by IsaacBlum at 31 December 2009

Category: Uncategorized

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
##########################################################
##Actvate a Feature on all Sites for a web application ###
## http://Blog.IsaacBlum.com ##
##########################################################
##########################################################
 
 
#Create function activatefeature
function activatefeature{
 
## Reference to SharePoint DLL
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
 
## Location of sharepoint STSADM utility program, You may need to change this
$stsadm = "$env:programfilesCommon FilesMicrosoft SharedWeb Server Extensions12BINSTSADM.EXE"
 
#Ask for WebApp Root url to enumerate
$url = Read-Host "Please enter root url of WebApplication"
 
#Enumerate available features in SharePoint Farm
write-host -foregroundcolor green " Below are the available features in SharePoint Farm"
&stsadm -o scanforfeatures
 
#Ask for Feature Name
Write-Host "Please enter feature name that will be activated at all Sites and Sub-Sites of the specified application"
$feature = Read-Host "do not add the feature.xml. ex: %featurename%"
 
#Returning info for use in remainder of script
$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($url)
 
#List Sites Affected
write-host -foregroundcolor green " The feature will be actvated on the following Sites:"
foreach ($site in $webapp.Sites) {
#        write-host $webapp.Name
	foreach ($web in $site.AllWebs) {
        write-host $web.URL
		}}
 
##Actvate Feature on all Sites
foreach ($site in $webapp.Sites) {
	foreach ($web in $site.AllWebs) {
    	$sResult = &stsadm -o activatefeature -name $feature -url $web.URL -force
		if(($sResult -like "*Operation completed successfully*")){ write-host -foregroundcolor green "Feature Actvated : "$web.URL}
   		else {
      			Write-Host -ForegroundColor "red" -BackgroundColor "white" "Activate of feature '$feature' for" $web.URL "Failed! `n $sResult"
	}
    }
	}
}
 
 
 
########
########
########

Posted by IsaacBlum at 31 December 2009

Category: Business, For The Greater Good, Free Help, PowerShell

Tags: ,

Add the below code to any PowerShell script to call a pause.

This code is made possible by http://blogs.msdn.com/powershell/archive/2007/02/25/pause.aspx

1
2
3
4
5
6
function Pause ($Message="Press any key to continue...")
{
Write-Host -NoNewLine $Message
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Write-Host ""
}

Posted by IsaacBlum at 23 December 2009

Category: Uncategorized

Tags:

I manly just like the video, not convinced on the Google wave, but I’m sure I’ll come around..

YouTube Preview Image

Posted by IsaacBlum at 22 December 2009

Category: Business, For The Greater Good, Microsoft, SharePoint, WSS 3.0

Tags: , , ,

Thanks to http://blogs.msdn.com/sharepoint/archive/2007/03/02/be-wary-when-removing-or-replacing-the-my-site-link.aspx and http://suguk.org/forums/thread/6898.aspx.

I needed a way of adding a link back to the portal site, when in my MySite. I went to “Personalization site links”. Added a link but every time it would add the http://%yoururl%/default.aspx?MySiteView=1 . Made me crazy. Anyway thanks to the folks that bloged about it first.

Posted by IsaacBlum at 14 December 2009

Category: Games, Halo, Personal

Tags: ,

YouTube Preview Image
  • Archives

  • Tags

  • Subscribe
  • Pages

  • More

  • Disclaimer…

    This is my personal weblog. The opinions expressed herein are my own and are not representative of any 3rd party influence. The owner of this blog reserves the right to edit or delete any comments submitted to this blog without notice if they are deemed to be spam, offensive or otherwise inappropriate. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.


    Lastly, I do my best to document my sources if the article is not of my own creation. If I have missed or forgotten to source your work. I would love feedback via the comments section. Thank you.

DreamHost promos
SiteLock