Tag Archives: PowerShell Magazine

New article on PowerShell Magazine: Use Shell.Application to display extended file attributes

My latest article on PowerShell Magazine is on how to use Shell.Application Com object to display extended file attributes in PowerShell. Because this is heavily dependent on the Windows version and localization this does present some challenges. The full article containing tips on how to use this class is available on PowerShell Magazine : Use Shell.Application to display extended file attributes

The following example will list the first three attributes using the Shell.Application object:

$com = (New-Object -ComObject Shell.Application).NameSpace('C:\')
$com.Items() | ForEach-Object {
 New-Object -TypeName PSCustomObject -Property @{
 Name = $com.GetDetailsOf($_,0)
 Size = $com.GetDetailsOf($_,1)
 ItemType = $com.GetDetailsOf($_,2)
 }
}

For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine. The article posted on PowerShell magazine contains a link to my Get-ExtensionAttribute script in the TechNet Script Gallery.

Links in this Article
PSTip: Use Shell.Application to display extended file attributes
PowerShell Magazine
External Articles
Get-ExtensionAttribute
My entries in TechNet Script Gallery
Share

New article on PowerShell Magazine: Retrieve scheduled tasks using Schedule.Service COMObject

My new tip has been posted on PowerShell Magazine is on how to retrieve scheduled tasks using Schedule.Service Com Object using PowerShell. Using this object it is possible to retrieve information about scheduled tasks either on the local or remote system. The full article containing tips on how to use this com object and what the considerations are when using this object is available on PowerShell Magazine : Retrieve scheduled tasks using Schedule.Service COMObject

The following code will connect to the local system using the Schedule.Service Com Object, administrative permissions are required to run this code:

$Schedule = New-Object -ComObject "Schedule.Service"
$Schedule.Connect('localhost')
$Folder = $Schedule.GetFolder('\')
$Folder.GetTasks(1) | Select Name,Path,State

For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine. The article posted on PowerShell magazine contains a link to my Get-ScheduledTask script in the TechNet Script Gallery.

Links in this Article
PSTip: Retrieve scheduled tasks using Schedule.Service COMObject
PowerShell Magazine
External Articles
Get-ScheduledTask
My entries in TechNet Script Gallery
Share

New article on PowerShell Magazine: Use Windows Forms to generate GUI messagebox

Today’s tip on PowerShell Magazine is on how to create a MessageBox using Windows.Forms in PowerShell. This allows for a popup window to appear prompting for user interaction. The full article containing tips on how to use this class is available on PowerShell Magazine : Use Windows Forms to generate GUI messagebox

To generate a GUI message box the following code can be used:

Add-Type -AssemblyName System.Windows.Forms | Out-Null
[System.Windows.Forms.MessageBox]::Show("Hello World")

For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine.

Links in this Article
PSTip: Use Windows Forms to generate GUI messagebox
PowerShell Magazine
External Articles
Share

New article on PowerShell Magazine: Show friendly GPO names with Get-ADOrganizationalUnit

Today’s tip is on how to use the Get-OUWithGPOLink funtion in combination with the Get-ADOrganizationalUnit cmdlet. The output of ADOrganizational unit is updated with a new property, FriendlyGPODisplayName. The article is available on PowerShell Magazine:

http://www.powershellmagazine.com/2014/07/25/pstip-show-friendly-gpo-names-with-get-adorganizationalunit/

The full script is also available in the TechNet Script Gallery, Get-OUWithGPO.ps1, at the following link:
http://gallery.technet.microsoft.com/Get-OUWithGPOLinks-List-02bfe340

Share