CommandLine ----------- go-deploy ls go-temp ls clear dir ls get-childitems get-childitem get-psdrive cd hklm: ls cd SOFTWARE ls cd Microsoft ls cd 'Windows CE Services' ls cd variable: ls $foo = "bar" ls cd variable:|sort -prop Name ls|sort -prop Name ls|where-object {$_.Value -eq "bar"} ls|? {$_.Value -eq "bar"} ls|? {$_.Value -like "bar"} go-temp ls cd .. ls cd temp ls ls|? {$_.PSiscontainer -eq $false} ls|select -first 1 ls|select -first 1|%{$_} ls|select -first 1|%{$_.GetType()} ls|select -first 1|gm ls ls|? {$_.PSiscontainer -eq $false}|format-table Name, Length,Extension $ary = 3,2,6,4,123,3245 $ary $ary|sort $ary|sort -desc $ary.GetType() [xml]$x = "c-onec-two" $x $a.b.c $a.b $x.a.b.c $x.a.b.c|? {$_ -like "*two"} go-deploy ls notepad buildDdf.ps1 notepad buildDdf.ps1 notepad buildSolution.ps1 & 'C:\Users\niversen\Documents\Projects\DevConnections\DevConnections Fall 2008\Code\DevConnectionsFall2008\JustAddC... notepad buildDdf.ps1 [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint") $site = new-object Microsoft.Sharepoint.SPSite("http://msp-niversen:8081/devconn/posh") $site $web = $site.OpenWeb() $web $web.Url $url = $web.Url $web.Lists $web.Lists["docs"] $web.Lists["docs"].Items $web.Lists["docs"].Items.count go-temp ls cd .. notepad SharePointCmds.ps1 get-spweb . C:\Users\niversen\Documents\SharePointCmds.ps1 get-spweb get-spweb($url) notepad $profile $item = get-splistitem "http://msp-niversen:8081/DevConn/Posh/Docs/desktop.ini" $item set-documentmetadata "http://msp-niversen:8081/DevConn/Posh/Docs/desktop.ini" "vti_title" "My fancy new title" approve-splistitem "http://msp-niversen:8081/DevConn/Posh/Docs/desktop.ini" "This is an important approval" $item $item.Properties add-usertospweb "testuser1" "wss owners" $url "testuser1", "testuers2" "testuser1", "testuers2"|%{ add-usertospweb $_ "wss owners" $url} cd temp notepad JustAddCode.Types.ps1xml cd files ls $web.Lists["Docs"].RootFolder $web.Lists["Docs"].RootFolder.GetType() $web.Lists["Docs"].RootFolder.File $web.Lists["Docs"].RootFolder.Files $web.Lists["Docs"].RootFolder.Files.GetType() $web.Lists["Docs"].RootFolder.Files. $web.Lists["Docs"].RootFolder.Files.FancyAddFile Update-TypeData -prepend C:\Users\niversen\Documents\temp\JustAddCode.Types.ps1xml $web.Lists["Docs"].RootFolder.Files.FancyAddFile ls ls |%{ $web.Lists["Docs"].RootFolder.Files.FancyAddFile($_)} dispose-disposableitems $site.AllWebs|add-disposableitem|format-table Url dispose-disposableitems cd .. ls $ws = C:\Users\niversen\Documents\temp\New-WebServiceProxy.ps1 -url "http://msp-niversen:8081/devconn/posh/_vti_bin/... $ws $wp = cat PowerShellWebPart.webpart $ws.AddWebPart $ws.AddWebPart("http://msp-niversen:8081/devconn/posh/default.aspx",$wp,"Shared") Set-ExecutionPolicy help Set-ExecutionPolicy -detailed notepad $profile [system.guid]::newguid() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() [system.guid]::newguid().tostring() $web.Features $web.Features|{$_.Defintion} $web.Features|{$_.Definition} $web.Features|%{$_.Definition} $web.Features|%{$_.Definition}|format-table DisplayName,Hiden $web.Features|%{$_.Definition}|format-table DisplayName,Hidden $web.Features|%{$_.Definition}|select -first 1|gm get-history -count 1000|select CommandLine > powershellhistory.txt