dir ls get-childitem cd .. ls cd file.ext1 cd files notepad test.txt ls mv test.txt test-new.txt ls copy test-new.txt testtwo.txt ls help dir help dir -full help *opera* help get-* ls ls|foreach-object{$_} ls|foreach-object{$_.GetType()} ls|foreach-object{$_.Name} ls|foreach-object{$_.FullName} ls|foreach-object{$_.Extension} ls|get-member ls ls|where-object {$_.Length -gt 6} ls|? {$_.Length -gt 6} ls|? {$_.Length -gt 6}|get-member ls|? {$_.Length -gt 6}|foreach-object{$_.GetType()} ls|? {$_.Length -gt 6}|select-object -first 1 ls|? {$_.Length -gt 6}|select-object -last 1 ls|? {$_.Length -gt 6}|select-object -last 2 ls|? {$_.Length -gle 6}|select-object -last 2 ls|? {$_.Length -ge 6}|select-object -last 2 ls|? {$_.Length -lt 6}|select-object -last 2 ls|? {$_.Length -lte 6}|select-object -last 2 ls help format* ls|format-table ls|format-table FullName,Length ls|sort -prop Length|format-table FullName,Length ls|sort -prop Length -desc |format-table FullName,Length ls|sort -prop Length -desc |format-list FullName,Length $foo = "bar" $foo $foo.GetType() $ary = 4,2,6,1,8 $ary $ary.GetType() $ary|sort $ary|sort -desc ls ls|sort -prop Length -desc [system.reflection.assembly]::loadwithpartialname("Microsoft.SharePoint") $site = new-object Microsoft.SharePoint.SPSite("http://msp-niversen:88/modig") $site $site.GetType() $web = $site.OpenWeb() $web $web.List $web.Lists $web.Lists|format-table Name,Url $web.Lists|gm $web.Lists|format-table Title $web.Lists|format-table Title,BaseTemplate $web.Lists|format-table Title,DefaultViewUrl $web.Lists["DocLib"].Item $web.Lists["DocLib"].Items $web.Lists["DocLib"].Items[0] $item = $web.Lists["DocLib"].Items[0] $item.Properties $item.Properties["vti_title"] $item.Properties["vti_title"] = "My New Title" $item.Update() $item.Properties["MyConfig"] = "Some Configuration Information" $item.Update() $item.Properties $web.Properties $list $list = $web.Lists["DocLib"] $list.Itme $list.Items $list.RootFolder $list.RootFolder.Files $list.RootFolder.Files|gm $list.RootFolder.Files.Add [byte[]]$mydata = "this is nearly a bytearayy".ToCharArray() "asdf".ToCharArray() $mydata $list.RootFolder.Files.Add("myname.txt",$mydata) 1..10 1..10|%{$list.RootFolder.Files.Add($_+"myname.txt",$mydata)}|out-null 1..10|%{$list.RootFolder.Files.Add($_.ToString()+"myname.txt",$mydata)}|out-null 1..10|%{$list.RootFolder.Files.Add($_.ToString()+"myname.txt",$mydata)}|out-nu $web.Lists["MyList"] $list = $web.Lists["MyList"] $list.Items $list.Items|format-table Name $list.Items|format-table Name,Url $list.Items.add $list.Items.add("",1) $list.Items.add("/modig",1) $list.Items.add($list.RootFolder.ServerRelativeUrl,1) $list.RootFolder.ServerRelativeUrl $item = $list.Items.add($list.RootFolder.ServerRelativeUrl,1) $item $item["Title"]= "Folder Name" $item.Update() $list = $web.Lists["MyList"] $list.Items[0] $myitem = $list.Items[0] $myitem["NeilColumn"] = "stuff" $myitem.Update() $item = $list.Items.add($list.RootFolder.ServerRelativeUrl+"Folder Name",0) $item["Title"] = "I'm in a subfolder" $item.UPdate() $item.Update() $item = $list.Items.add($list.RootFolder.ServerRelativeUrl+"/Folder Name",0) $item["Title"] = "I'm in a subfolder" $item.Update() cd C:\windows\system32\WindowsPowerShell ls cd v1.0 ls cat justaddcode.types.ps1xml notepad justaddcode.types.ps1xml Update-Type -prepend justaddcode.types.ps1xml Update-Typedata -prepend justaddcode.types.ps1xml $list $list = $web.Lists["DocLib"] $list.RootFolder cd C:\temp\file.ext1 cd C:\temp\files ls $list.RootFolder.Files $list.RootFolder.Files|gm $list.RootFolder.Files|gm|sort -prop Name $list.RootFolder.Files.FancyAddFile ls|%{$list.RootFolder.Files.FancyAddFile($_)} ls|%{$list.RootFolder.Files.FancyAddFile($_)} $list = $web.Lists["MyList"] $list.Item $list.Items $list.RootFolder $list.RootFolder.SubFolders["Attachments"] $list.RootFolder.SubFolders["Attachments"].SubFolders["1"] $list.RootFolder.SubFolders["Attachments"].SubFolders["1"].FancyAddFile $list.RootFolder.SubFolders["Attachments"].SubFolders["1"] $list.RootFolder.SubFolders["Attachments"].SubFolders["1"].GetType() $list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files $list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files.FancyAddFile ls|$list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files.FancyAddFile($_) ls|%{$list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files.FancyAddFile($_)} 1..10|%{$list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files.Add($_.ToString()+"newfile.txt", [byte[]]"test".ToCharArray())} 2..10|%{$list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files.Add($_.ToString()+"newfile.txt", [byte[]]"test".ToCharArray())}|out-null 11..3000|%{$list.RootFolder.SubFolders["Attachments"].SubFolders["1"].Files.Add($_.ToString()+"newfile.tx t",[byte[]]"test".ToCharArray())}|out-null cd hklm: ls cd SOFTWARE ls cd Microsoft ls cd C:\temp\file cd C:\temp\files get-history get-history|format-list CommandLIne|out-file -append c:\temp\hist.txt cat C:\temp\hist.txt notepad $profile help get-history -full get-history -1000 get-history -count 1000