Browse by Tags

All Tags » powershell (RSS)

Create Policies for Sharepoint and Powershell 1.0 by steve schofield

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint.Publishing") $SiteURL = " http://www.example.com " $site = new-object Microsoft.SharePoint.SPSite($siteURL...
Filed under: ,

Use Powershell, WMI to retrieve DNS search order, Use Active Directory for list of computers. by steve schofield

# ********************* Global variables ********************* $sb = new-object System.Text.StringBuilder $sbErrors = new-object System.Text.StringBuilder # ********************* Defining functions ********************* function GetListOfComputer { $strCategory...
Filed under: ,

Powershell, Sharepoint and granting SPBasePermissions by steve schofield

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...
Filed under: ,

Powershell script to collect certain operating system versions and pipe out computer name by steve schofield

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...
Filed under:

List Local administrators on a machine using Powershell, ADSI by steve schofield

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...
Filed under:

Writing out computer list retrieved from Active Directory and output to a text file using Add-Content by steve schofield

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...
Filed under:

Powershell 1.0 script to update Active Directory FTP User isolation attributes (msIIS-FTPDir, msIIS-FTPRoot) by steve schofield

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...

Use Appcmd to set IIS compression level by steve schofield

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...
Filed under: , ,

Using Powershell 1.0 to execute remote processes that need PacketPrivacy authentication by steve schofield

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...
Filed under:

Grant NTFS security to a remote folder using WMI, Powershell. by steve schofield

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...
Filed under:
More Posts Next page »