<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Steve Schofield Weblog : powershell</title><link>http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx</link><description>Tags: powershell</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Create Policies for Sharepoint and Powershell 1.0</title><link>http://weblogs.asp.net/steveschofield/archive/2009/08/31/create-policies-for-sharepoint.aspx</link><pubDate>Tue, 01 Sep 2009 03:50:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7187382</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=7187382</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/08/31/create-policies-for-sharepoint.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")&lt;BR&gt;[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint.Publishing")&lt;/P&gt;
&lt;P mce_keep="true"&gt;$SiteURL = "&lt;A href="http://www.example.com/" mce_href="http://www.example.com/"&gt;http://www.example.com&lt;/A&gt;"&lt;BR&gt;$site = new-object Microsoft.SharePoint.SPSite($siteURL)&lt;BR&gt;$web = $site.OpenWeb()&lt;BR&gt;$list = $web.Lists["Cache Profiles"]&lt;BR&gt;$newitem = $list.items.Add()&lt;BR&gt;$newitem["Title"]= "AnonCachePolicy"&lt;BR&gt;$newitem["Display Name"]= "AnonCachePolicy"&lt;BR&gt;$newitem["Display Description"]= "AnonCachePolicy"&lt;BR&gt;$newitem["Perform ACL Check"] = $false&lt;BR&gt;$newitem["Enabled"] = $true&lt;BR&gt;$newitem["Duration"] = 60&lt;BR&gt;$newitem["Check for Changes"] = $false&lt;BR&gt;$newitem["Vary by HTTP Header"] = "User-Agent"&lt;BR&gt;$newitem["Vary by User Rights"] = $false&lt;BR&gt;$newitem["Cacheability"] = "ServerAndPrivate"&lt;BR&gt;$newitem["Safe for Authenticated Use"] = $false&lt;BR&gt;$newitem["Allow writers to view cached content"] = $false&lt;BR&gt;$newitem.update()&lt;/P&gt;
&lt;P mce_keep="true"&gt;$anonID = ($list.items | where {$_.Name -eq "AnonCachePolicy"}).ID&lt;/P&gt;
&lt;P mce_keep="true"&gt;$newitem = $list.items.Add()&lt;BR&gt;$newitem["Title"]= "AuthCachePolicy"&lt;BR&gt;$newitem["Display Name"]= "AuthCachePolicy"&lt;BR&gt;$newitem["Display Description"]= "AuthCachePolicy"&lt;BR&gt;$newitem["Perform ACL Check"] = $true&lt;BR&gt;$newitem["Enabled"] = $true&lt;BR&gt;$newitem["Duration"] = 60&lt;BR&gt;$newitem["Check for Changes"] = $true&lt;BR&gt;$newitem["Vary by HTTP Header"] = "HTTP_USER"&lt;BR&gt;$newitem["Vary by User Rights"] = $false&lt;BR&gt;$newitem["Cacheability"] = "ServerAndNoCache"&lt;BR&gt;$newitem["Safe for Authenticated Use"] = $true&lt;BR&gt;$newitem["Allow writers to view cached content"] = $false&lt;BR&gt;$newitem.update()&lt;/P&gt;
&lt;P mce_keep="true"&gt;$authID = ($list.items | where {$_.Name -eq "AuthCachePolicy"}).ID&lt;/P&gt;
&lt;P mce_keep="true"&gt;$cacheSettings = new-object Microsoft.SharePoint.Publishing.SiteCacheSettingsWriter($site)&lt;BR&gt;$cacheSettings.EnableCache = $true&lt;BR&gt;$cacheSettings.ObjectCacheSize = 200&lt;BR&gt;$cacheSettings.SetAnonymousPageCacheProfileId($site, $anonID)&lt;BR&gt;$cacheSettings.SetAuthenticatedPageCacheProfileId($site, $authID)&lt;BR&gt;$cacheSettings.Update()&lt;/P&gt;
&lt;P mce_keep="true"&gt;$web.Dispose()&lt;BR&gt;$site.Dispose()&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7187382" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/Sharepoint/default.aspx">Sharepoint</category></item><item><title>Use Powershell, WMI to retrieve DNS search order, Use Active Directory for list of computers.</title><link>http://weblogs.asp.net/steveschofield/archive/2009/08/01/use-powershell-wmi-to-retrieve-dns-search-order-use-active-directory-for-list-of-computers.aspx</link><pubDate>Sat, 01 Aug 2009 19:09:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7159435</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=7159435</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/08/01/use-powershell-wmi-to-retrieve-dns-search-order-use-active-directory-for-list-of-computers.aspx#comments</comments><description>&lt;P&gt;# ********************* Global variables *********************&lt;BR&gt;$sb =&amp;nbsp; new-object System.Text.StringBuilder&lt;BR&gt;$sbErrors =&amp;nbsp; new-object System.Text.StringBuilder&lt;/P&gt;
&lt;P&gt;# ********************* Defining functions *********************&lt;BR&gt;function GetListOfComputer&lt;BR&gt;{&lt;BR&gt;$strCategory = "computer"&lt;BR&gt;$objDomain = New-Object System.DirectoryServices.DirectoryEntry&lt;BR&gt;$objSearcher = New-Object System.DirectoryServices.DirectorySearcher&lt;/P&gt;
&lt;P&gt;$objSearcher.SearchRoot = $objDomain&lt;BR&gt;$objSearcher.Filter = ("(objectCategory=$strCategory)")&lt;/P&gt;
&lt;P&gt;$colProplist = "name"&lt;BR&gt;foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}&lt;/P&gt;
&lt;P&gt;$colResults = $objSearcher.FindAll()&lt;/P&gt;
&lt;P&gt;foreach ($objResult in $colResults)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;$objComputer = $objResult.Properties; $objComputer.name&lt;BR&gt;&amp;nbsp;&amp;nbsp;[string]$CN = $objComputer.name&lt;BR&gt;&amp;nbsp;&amp;nbsp;$ipaddress = Ping-Address $objComputer.name&lt;BR&gt;&amp;nbsp;&amp;nbsp;FOREACH-OBJECT {LogInfo $CN $ipaddress}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;function Ping-Address ([string]$strComputerName)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;$ipaddress = [System.Net.Dns]::GetHostbyName("$strComputerName") | select AddressList&lt;BR&gt;&amp;nbsp;$strGetIPAddress = $ipaddress.AddressList[0].IpAddressToString&lt;BR&gt;&amp;nbsp;Return $strGetIPAddress&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;function LogInfo ([string]$strServerName, [string]$strIPAddress)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp; Write-Host $strServerName + "," + $strIPAddress&lt;BR&gt;&amp;nbsp; $pingresult = Get-WmiObject win32_pingstatus -Filter "address='$strIPAddress'"&lt;BR&gt;&amp;nbsp; $error.Clear()&lt;BR&gt;&amp;nbsp; $ErrorActionPreference = "SilentlyContinue"&lt;BR&gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp; if($pingresult.statuscode -eq 0) &lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trap [Exception] {continue}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $colItems = get-wmiobject -query "Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = 1" -namespace "root\cimv2" -computername $strIPAddress&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($objItem in $colItems) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $strCaption =&amp;nbsp; $objItem.Caption&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host $strCaption&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $strDescription =&amp;nbsp; $objItem.Description&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host $strDescription&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $strDNSServerSearchOrder = $objItem.DNSServerSearchOrder&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host $strDNSServerSearchOrder&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $result = $strServerName + "," + $strIPAddress + "," + $strDNSServerSearchOrder + "," + $strCaption + "," + $strDescription + "`r"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $sb.Append($result)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp; else &lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write-Host "Cannot connect:" + $strServerName + "," + $strIPAddress&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $sbErrors.AppendLine($strServerName + "," + $strIPAddress + "`r")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;# ********************* Get list of Computers and call function to get data *********************&lt;BR&gt;GetListOfComputer&lt;/P&gt;
&lt;P&gt;# ********************* Write out data *********************&lt;BR&gt;write-output $sb.ToString() &amp;gt;E:\Temp\ComputerList.txt &lt;BR&gt;write-output $sbErrors.ToString() &amp;gt;E:\Temp\ComputerListNotFound.txt &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7159435" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/WMI/default.aspx">WMI</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Powershell, Sharepoint and granting SPBasePermissions</title><link>http://weblogs.asp.net/steveschofield/archive/2009/02/15/powershell-sharepoint-and-granting-spbasepermissions.aspx</link><pubDate>Mon, 16 Feb 2009 00:10:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6909311</guid><dc:creator>steve schofield</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6909311</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/02/15/powershell-sharepoint-and-granting-spbasepermissions.aspx#comments</comments><description>Over the last few months, I've been learning how to automate Sharepoint installs and perform base configurations. Between psconfig , stsadm and stsadm extension by Gary LaPoint, I've been able to achieve pretty much a scripted install. Most of the configuration...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2009/02/15/powershell-sharepoint-and-granting-spbasepermissions.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6909311" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/Sharepoint/default.aspx">Sharepoint</category></item><item><title>Powershell script to collect certain operating system versions and pipe out computer name </title><link>http://weblogs.asp.net/steveschofield/archive/2009/02/05/powershell-script-to-collect-certain-operating-system-versions-and-pipe-out-computer-name.aspx</link><pubDate>Thu, 05 Feb 2009 15:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6885403</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6885403</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/02/05/powershell-script-to-collect-certain-operating-system-versions-and-pipe-out-computer-name.aspx#comments</comments><description>One of the things I struggle is 'syntax' when it comes to scripting. This Powershell script is a combo of things I found to help filter which results are exported from Active Directory. Hope this helps. $strCategory = "computer" $objDomain = New-Object...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2009/02/05/powershell-script-to-collect-certain-operating-system-versions-and-pipe-out-computer-name.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6885403" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>List Local administrators on a machine using Powershell, ADSI</title><link>http://weblogs.asp.net/steveschofield/archive/2009/01/08/list-local-administrators-on-a-machine-using-powershell-adsi.aspx</link><pubDate>Fri, 09 Jan 2009 03:25:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6828850</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6828850</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/01/08/list-local-administrators-on-a-machine-using-powershell-adsi.aspx#comments</comments><description>I need to audit our local administrators group. I wanted to convert my script to Powershell that I've used for years. I found the magic post here that shows the core syntax. I wouldn't have guessed the syntax in a dozen years. Here is the VBScript. Set...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2009/01/08/list-local-administrators-on-a-machine-using-powershell-adsi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6828850" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Writing out computer list retrieved from Active Directory and output to a text file using Add-Content</title><link>http://weblogs.asp.net/steveschofield/archive/2009/01/06/writing-out-computer-list-retrieved-from-active-directory-and-output-to-a-text-file-using-add-content.aspx</link><pubDate>Tue, 06 Jan 2009 21:45:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6822917</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6822917</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/01/06/writing-out-computer-list-retrieved-from-active-directory-and-output-to-a-text-file-using-add-content.aspx#comments</comments><description>Hope this helps someone, it took me a bit to get the syntax down and understand why. (Yes, I'm still a PoSh newbie) I discovered when I was trying to write out a computer list retrieved from Active Directory, the output in the file was System.DirectoryServices...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2009/01/06/writing-out-computer-list-retrieved-from-active-directory-and-output-to-a-text-file-using-add-content.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6822917" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Powershell 1.0 script to update Active Directory FTP User isolation attributes (msIIS-FTPDir, msIIS-FTPRoot)</title><link>http://weblogs.asp.net/steveschofield/archive/2009/01/02/powershell-1-0-script-to-update-active-directory-ftp-user-isolation-attributes-msiis-ftpdir-msiis-ftproot.aspx</link><pubDate>Sat, 03 Jan 2009 03:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6815388</guid><dc:creator>steve schofield</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6815388</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2009/01/02/powershell-1-0-script-to-update-active-directory-ftp-user-isolation-attributes-msiis-ftpdir-msiis-ftproot.aspx#comments</comments><description>I recently posted an article how to setup FTP User Isolation and Active Directory together. Here is the article . In the post, I mentioned you'll need to engage your AD administrator to update the two attributes. Here is a script using Powershell 1.0...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2009/01/02/powershell-1-0-script-to-update-active-directory-ftp-user-isolation-attributes-msiis-ftpdir-msiis-ftproot.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6815388" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/IIS/default.aspx">IIS</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/Active+Directory/default.aspx">Active Directory</category></item><item><title>Use Appcmd to set IIS compression level</title><link>http://weblogs.asp.net/steveschofield/archive/2008/12/24/use-appcmd-to-set-iis-compression-level.aspx</link><pubDate>Wed, 24 Dec 2008 14:55:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6806182</guid><dc:creator>steve schofield</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6806182</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/12/24/use-appcmd-to-set-iis-compression-level.aspx#comments</comments><description>Here are a few commands to set properties on IIS compression. 'This was run from cmd.exe c:\windows\system32\inetsrv\appcmd set config -section:urlCompression /doDynamicCompression:true c:\windows\system32\inetsrv\appcmd set config -section:system.webServer...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/12/24/use-appcmd-to-set-iis-compression-level.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6806182" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/IIS/default.aspx">IIS</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category><category domain="http://weblogs.asp.net/steveschofield/archive/tags/compression/default.aspx">compression</category></item><item><title>Using Powershell 1.0 to execute remote processes that need PacketPrivacy authentication</title><link>http://weblogs.asp.net/steveschofield/archive/2008/12/09/using-powershell-to-execute-remote-processes-that-need-packetprivacy-authentication.aspx</link><pubDate>Tue, 09 Dec 2008 19:52:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6775555</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6775555</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/12/09/using-powershell-to-execute-remote-processes-that-need-packetprivacy-authentication.aspx#comments</comments><description>I was using Powershell to do some work remotely with a DCOM component and ran into a requirement to use PacketPrivacy AuthenticationLevel . I've found sometimes having commands to copy files from a unc path to a remote machine, then executing them is...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/12/09/using-powershell-to-execute-remote-processes-that-need-packetprivacy-authentication.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6775555" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Grant NTFS security to a remote folder using WMI, Powershell.  </title><link>http://weblogs.asp.net/steveschofield/archive/2008/12/08/grant-security-to-a-remote-folder-using-wmi-powershell.aspx</link><pubDate>Mon, 08 Dec 2008 15:15:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6772023</guid><dc:creator>steve schofield</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6772023</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/12/08/grant-security-to-a-remote-folder-using-wmi-powershell.aspx#comments</comments><description>I needed to adjust NTFS folder security using powershell on a remote folder. The user was 'LOCAL Service'. The command contains the ` character, it's a escape key for having double quotes inside a string. Interesting way of powershell handling that. Better...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/12/08/grant-security-to-a-remote-folder-using-wmi-powershell.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6772023" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Create domain groups with Powershell and ADSI / LDAP provider</title><link>http://weblogs.asp.net/steveschofield/archive/2008/12/02/create-domain-groups-with-powershell-and-adsi-ldap-provider.aspx</link><pubDate>Wed, 03 Dec 2008 01:49:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6763354</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6763354</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/12/02/create-domain-groups-with-powershell-and-adsi-ldap-provider.aspx#comments</comments><description>Handy little script to create Active Directory groups with Powershell. The script assumes it's run on a domain controller. It could also be run remotely and just adjust the script with a DC name. There are a few different examples, it took me a few tries...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/12/02/create-domain-groups-with-powershell-and-adsi-ldap-provider.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6763354" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Powershell version of On Error Resume next.....Maybe</title><link>http://weblogs.asp.net/steveschofield/archive/2008/12/02/powershell-version-of-on-error-resume-next-maybe.aspx</link><pubDate>Wed, 03 Dec 2008 01:37:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6763346</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6763346</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/12/02/powershell-version-of-on-error-resume-next-maybe.aspx#comments</comments><description>I'm sure powershell people will correct me, but coming from a VBScript background, ON ERROR RESUME NEXT had it's uses. I worked on a script and needed to execute a command even though an error might happen. I needed a quick a dirty execution statement...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/12/02/powershell-version-of-on-error-resume-next-maybe.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6763346" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Path, CommandLine and ExecutablePath not exposed in Powershell using WMI as a regular user.</title><link>http://weblogs.asp.net/steveschofield/archive/2008/11/09/path-commandline-and-executablepath-not-exposed-in-powershell-using-wmi-as-a-regular-user.aspx</link><pubDate>Mon, 10 Nov 2008 03:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6728117</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6728117</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/11/09/path-commandline-and-executablepath-not-exposed-in-powershell-using-wmi-as-a-regular-user.aspx#comments</comments><description>This post is more a question and a on-going research. Thought I would share my findings so far. If you know the answer, please do share. :) I've been trying understand why the three properties (Path, CommandLine, Executable) not exposed to non-Administrators...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/11/09/path-commandline-and-executablepath-not-exposed-in-powershell-using-wmi-as-a-regular-user.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6728117" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>Execute a command with Powershell using Win32_Process</title><link>http://weblogs.asp.net/steveschofield/archive/2008/10/27/execute-a-command-with-powershell-using-win32-process.aspx</link><pubDate>Tue, 28 Oct 2008 01:51:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6707894</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6707894</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/10/27/execute-a-command-with-powershell-using-win32-process.aspx#comments</comments><description>$cmd = "xcopy c:\1.txt c:\temp\1.txt /A" $server = "." $user = "domain\userName" $pass = "p@ssw0rd" $process = [ WMIClass ] "\\$server\ROOT\cimv2:Win32_Process" #$process.psbase.Scope.Options.userName=$user #$process.psbase.Scope.Options.Password=$pass...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/10/27/execute-a-command-with-powershell-using-win32-process.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6707894" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item><item><title>IIS Powershell Provider info and articles</title><link>http://weblogs.asp.net/steveschofield/archive/2008/10/12/powershell-provider-info-and-articles.aspx</link><pubDate>Mon, 13 Oct 2008 01:56:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6676009</guid><dc:creator>steve schofield</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/steveschofield/rsscomments.aspx?PostID=6676009</wfw:commentRss><comments>http://weblogs.asp.net/steveschofield/archive/2008/10/12/powershell-provider-info-and-articles.aspx#comments</comments><description>I've been recently trying to get more in-depth regarding Powershell and the IIS provider. Here are some articles along with the download link. 'Over 10 articles on Powershell and the IIS Provider. http://learn.iis.net/page.aspx/447/managing-iis-with-the...(&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/10/12/powershell-provider-info-and-articles.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6676009" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/steveschofield/archive/tags/powershell/default.aspx">powershell</category></item></channel></rss>