Now that you can list shares, how about something a bit more challenging?
Let’s take a look at share permissions. I tried using subinacl.exe to get these for a remote share. But it turns out that it does not always give trustworthy results. It showed read permissions for a share with Read and Change permissions. [...]
Here’s a handy little function I wrote for enumerating all shares on a remote server:
function Get-MyShares
{
param([string]$Server)
$Shares = Get-WmiObject -Class Win32_Share -ComputerName $Server
$output = @()
ForEach ($Share in $Shares)
{
$fullpath = “\\{0}\{1}” -f $server, $share.name
Add-Member -MemberType NoteProperty -InputObject $Share [...]
Do you ever require the users of your script to select which file to use?
I do. And it’s no fun trying to do decent error-handling when a user has to type the full path to a file. Nor is it any fun to be that user. So why not use the Windows Forms class [...]
Today’s Helpful Function of the Day is a great one to store in your profile. (Don’t know how to create or update your own custom profile? Read this.) It’s syntax is a simple as:
Get-MyServer SERVERNAME
It returns server information such as Operating System Version and Service Pack, Active Directory Description and Parent Container [...]
The PowerShell profile. In essence it’s nothing more than a personal script that runs each time you start PowerShell. But it’s possibilities are endless. But I’ll get to the possibilities later. Let’s first examine whether we have a profile.
Tags
Active Directory API bind order cleanup cluster CPU Custom Fields datastores description device management directory tree errors Event Log file name filter Fun function HA IT known issues License Server LUN multipath NIC objects Oneliner portgroups PowerCLI PowerShell profile recursive Registry Scripts security session share snapshots SQL Stat VI Toolkit VMware vSphere WMI WSUS ZenArchives
- July 2012
- July 2011
- February 2011
- January 2011
- December 2010
- May 2010
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008

Keep Your Server Descriptions Synchronized
Today’s “Helpful Function of the Day” is my attempt to help you keep your server descriptions in sync.
You use it by placing it in your profile, or by dot-sourcing the script, or by adding the function to one of your own scripts. The syntax is:
Check-Description [-ServerName] <YourServer> [-SkipIdentical]
If you would like to [...]