grokgarble.com

Database, Software, and System Engineering

Windows

Importing and Exporting Windows Features with PowerShell

This applies to Windows 7, Windows Server 2008 and Windows Server 2008 R2 and the use of Get-WindowsFeature and Add-WindowsFeature.  For Windows 8, Windows Server 2012, and Windows Server 2012 R2 Microsoft has overhauled these two cmdlets that I’ll handle the same usage in a different post. First the cmdlets we need are in the server manager module […]

,

Grant NTFS Permissions to a Domain Group using C#

Coupled with creating a network file share, you need to also ensure NTFS permissions are not more restrictive than the permissions you create on your share.  Otherwise, they will trump those permissions and your file share will be half done.  The least restrictive permissions always win.  See technet for more details on the security model. Using […]

,

Network File Share in .NET C#

Well, kinda… Using the ManagmentClass class (someone might be regretting the naming here) we can expose WMI in .NET.  Then, we can operate on methods of the Windows Managment Interface to create shares in C# code. Like all Windows API work, this isn’t super clear throughout MSDN or the Internet.  I also find that Windows […]

,

Using Write-EventLog cmdlet in PowerShell

I set out to create a standard method of interacting with the Write-EventLog cmdlet.  Simply put it will fail and I think it shouldn’t.  It could be a little more robust, so I created my own function that is.  The big thing that most people will benefit from is the ability to create a new […]

,

PowerShell for Free Space?

I needed a script that could be executed to report free space.  I’ll review how to do it locally and how to wrap it around an array of computer names so it can be ran from anywhere with RPC access to the target machines. For Starters Here’s the script that gets my my report from […]

, ,

WinRM for an Environment Simplified

Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol.  In many key items within the latest offerings from Microsoft management, included most obviously for me, PowerShell, it is the under pinning of many of the remote management operations. The idea is a good one.  Align with a standard in your latest technologies methods used to manage […]

, ,