|
|
|
Browse Blog Posts by Tags
-
In my previous post in this series, I showed how easy it is to work with enumerations in PowerShell. Here's the code I've been walking through in this series: $dacl = (dir foo.txt).GetAccessControl() $newRule = New-Object Security.AccessControl.FileSystemAccessRule "keith", Modify, Allow $modified =...
-
As part of a disaster recovery script, early on I wanted to ensure that all of the vdirs on a server were using ASP.NET 2.0. That meant that I wanted to run aspnet_regiis.exe -r but I didn't want to make any assumptions about what drive or directory Windows was installed in. What I wanted was something...
-
In part 3 , I walked through the following line of code: $newRule = New-Object Security.AccessControl.FileSystemAccessRule "keith", Modify, Allow I pointed out how the "Modify" was automatically converted into an enumeration value, promising that I'd talk more about enumerations later. Well, this value...
-
In my last post , I showed how to retrieve a file system ACL (well, technically a security descriptor ) via PowerShell. Today I'll show you how to tweak that ACL using System.Security.AccessControl. $newRule = New-Object Security.AccessControl.FileSystemAccessRule "keith", Modify, Allow This next line...
-
In my last post , I introduced a short little script that adjusts the security settings on a file. There are a number of fine points about PowerShell syntax and Windows security concepts that this little script relies upon, and I'm going to walk through them a little bit at a time so that you really...
-
2007 marked the year that I switched shells. I used to use the Hamilton C Shell , which was powerful and integrates exceptionally well with Windows, but I found myself constantly having to relearn the script syntax whenever I'd want to do something. So when PowerShell came along, I bought Bruce's book...
-
The next article in my series on PowerShell and SMO, PowerSMO At Work Part II is up on Simple-Talk.com now. Dan
-
I'm working on a series of articles on PowerSMO, my combination of PowerShell and SMO, for http://www.simple-talk.com . The first few are on the site now. Some of the topics in these articles are covered in the Applied SQL Server 2005 course. Dan
-
In our previous blog article Processing XML with PowerShell we looked at using XPath expressions to do calculations that used XML as input. One of the things that this article pointed out was that you often can do an entire calculation within an XPath expression. Sometimes, however, you want to read...
-
There are a couple of powerful technologies for processing native XML, XPath and XSLT. People often avoid processing native XML but instead convert the XML to an object model in a language they are used to and do “conventional” programming on that model. Even PowerShell itself does this with...
-
Now that we have PowerSMO! we can start making use of it. The first example will be building a test database. Whenever I work on an new database application or write labs for a course that involves databases I need to make test database with some data in them. T-SQL is just fine for defining tables and...
-
Last year I wrote a blog article about using what was then called MSH with SQL Server Management Objects http://pluralsight.com/blogs/dan/archive/2005/12/29/17703.aspx . MSH is now called PowerShell and mixing some SMO with it makes PowerSMO! SMO is a set of object models for SQL Server. With PowerSMO...
-
PowerShell has builtin support for XML, but the System.Xml namespace offers many additional capabilites for processing XML. This article looks at using System.Xml in PowerShell. This article assumes you know some of the basics of PowerShell programming and are familiar with the System.Xml namespace in...
-
Lots of times when you are working with a SQL Server all you want to do is to poke at the data. You aren’t doing any real heavy duty transactional processing, you just want to get a look at what is going on. Of course you can fire up SSMS (SQL Server Management Studio) or SqlCmd and issue some...
|
|
|
|
|
|