Various POSH commands

Current path:

get-location

[Environment]::CurrentDirectory

 

Download file:

$wc = (New-Object System.Net.WebClient)
$wc.DownloadFile($spUrl + $path + $dll, $file)
$item = get-item $file

 

Set a User Principal Name (UPN) for users’ Active Directory Account via POSH:

Import-Module ActiveDirectory
Get-ADUser -Filter * -SearchBase ‘CN=Users,dc=do,dc=local’ -Properties userPrincipalName | foreach { Set-ADUser $_ -UserPrincipalName “$($_.samaccountname)@%UPN%”}

 

Start-Transcript
Stop-Transcript

 

[regex]::replace($wa, ” “,””)

 

function aaaa {
[CmdletBinding()]
param(
[parameter(Position=1,Mandatory=$true)] $web
)

XXX
}

 

 

Various POSH commands

SharePoint useful links

List Template Gallery (site collection level )

http://%URL%/sites/%SITENAME%/_catalogs/lt/Forms/AllItems.aspx

 

/_layouts/images/docset_welcomepage_big.png

 

/_vti_bin/spdisco.aspx

/_vti_bin/Dws.asmx

 

Site Collection Administration : Web Analytics Reports – Summary

/_layouts/usage.aspx

 

SharePoint 2010 Item Display Form

https://%SITEURL%/Lists/%LISTNAME%/DispForm.aspx??&ID=%ID%

 

SharePoint 2010 view customization with predefined filters
https://%SITEURL%/Lists/%LISTNAME%/AllItems.aspx?View={%VIEWGUID%}&FilterField1=%FIELDINTERNALNAME%&FilterValue1=%VALUE%

SharePoint useful links