$MaximumHistoryCount = 9000 $global:gSite $hive = "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12" function get-dc() { $asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $global:gSite = new-object Microsoft.SharePoint.SPSite("http://bi-vpc/devconnections08") return $gSite.OpenWeb() } function get-features() { $asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $global:gSite = new-object Microsoft.SharePoint.SPSite("http://bi-vpc/devconnections08/features") return $gSite.OpenWeb() } function get-mobile() { $asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $global:gSite = new-object Microsoft.SharePoint.SPSite("http://bi-vpc/devconnections08/mobile") return $gSite.OpenWeb() } function get-posh() { $asm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $global:gSite = new-object Microsoft.SharePoint.SPSite("http://bi-vpc/devconnections08/posh") return $gSite.OpenWeb() } function get-safecontrolline($assemblyLocation) { $assembly = [System.Reflection.Assembly]::LoadFile($assemblyLocation) $name = $assembly.GetName() "" -f $assembly.FullName,$assembly.GetName().Name } function save-history() { get-history|format-list CommandLIne|out-file -append c:\temp\hist.txt } function add-testfiles() { $web = get-posh $list = $web.Lists["Docs"] 1..10|%{$list.RootFolder.Files.Add($_.ToString()+"asdf.txt",[byte[]]"teststuff".ToCharArray())}|out-null } function retitle-stuff() { $web.Lists|?{$_.BaseTemplate -eq "DocumentLibrary"}|select -expand Items|?{$_.Name -like "*.txt"}|%{$_.Properties["vti_title"] = "Retitled!"; $_.Update()} } ################ Start of PowerTab Initialisatie Code ######################## # # added to Profile by PowerTab Setup For Loading of Custom TabExpansion, # # /\/\o\/\/ 2007 # # http://ThePowerShellGuy.com # # Initialize PowerTab & 'C:\Temp\PowerTab098\Init-TabExpansion.ps1' ` -ConfigurationLocation 'C:\Documents and Settings\Administrator\My Documents\WindowsPowerShell' ################ End of PowerTab Initialisatie Code ##########################