Tag Archives: PowerShell Magazine

New interview on PowerShell Magazine: #PSConfAsia An Interview with PowerShell Expert Jaap Brasser

Last month I presented at the PowerShell Conference Asia PowerShell MVP and organizer of the event Ravikanth pulled me aside for an interview for a few minutes in a new series on PowerShell Magazine: PowerShell Magazine TV. The full article is available here:
PSConfAsia An Interview with PowerShell Expert Jaap Brasser

Currently interviews are still being released so be sure to check out the other interviews as other experts give their insights on the past, present and future of PowerShell. It is an interesting series so be sure you don’t miss out on this.

PowerShell Magazine: #PSConfAsia An Interview with PowerShell Expert Jaap Brasser

The links mentioned in this article are also available below, feel free to access them for more information:

Links in this Article
PSConfAsia An Interview with PowerShell Expert Jaap Brasser
PowerShell Magazine
Media
PowerShell Magazine Founder Ravikanth

New article on PowerShell Magazine: Get last login date for local account

LastLogon

Two weeks ago I wrote Get-LocalLastLogonTime and blogged about this. In this script I use the [adsi] type accelerator in combination with the WinNT provider to retrieve the LastLogin property of a user account. I wrote a short article on this for PowerShell Magazine : Get last login date for local account

1
([ADSI]"WinNT://computer/jaapbrasser").lastlogin

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: Get last login date for local account
PowerShell Magazine
External Articles
My entries in TechNet Script Gallery
Get-LocalLastLogonTime

New article on PowerShell Magazine: Use Shell.Application to determine which folder is open in File Explorer

Explorer

To determine which Windows are currently open in Explorer the Shell.Application Com Object can be used. Specifically the Windows() method of this object. It can retrieve the open Windows of both explorer as well as Internet Explorer. The full article  is available on PowerShell Magazine : Use Shell.Application to determine which folder is open in File Explorer

1
2
3
$ShellApp = New-Object -ComObject Shell.Application
$ShellApp.Windows() | Where-Object {$_.Name -eq 'File Explorer'} | 
Select-Object LocationName,LocationURL

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 Shell.Application to determine which folder is open in File Explorer
PowerShell Magazine
External Articles

New article on PowerShell Magazine: Convert .docx to .pdf using Word.Application

ConvertDocxPdf
To convert a docx document to pdf the Word.Application Com Object can be used, for PowerShell Magazine I wrote a tip in which I describe this process. The full article  is available on PowerShell Magazine : Convert .docx to .pdf using Word.Application

1
2
3
$Word = New-Object -ComObject "Word.Application"
($Word.Documents.Open('c:\temp\file.docx')).SaveAs([ref]'c:\temp\file.pdf',[ref]17) 
$Word.Application.ActiveDocument.Close()

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: Convert .docx to .pdf using Word.Application
PowerShell Magazine
External Articles

New article on PowerShell Magazine: Determine compression ratio of compressed files

Yesterday I posted about using the System.IO.Compression.ZipFile class to compress and extract files, this article is available here: Compress files and folders with System.IO.Compression.ZipFile class

The same class can be leveraged to retrieve the compression ratio for compressed files. The full article  is available on PowerShell Magazine : Determine compression ratio of compressed files

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: Determine compression ratio of compressed files
PowerShell Magazine
External Articles

New article on PowerShell Magazine: Compress files and folders with System.IO.Compression.ZipFile class

Unfortunately it is not possible to compress or extract zipped files using cmdlets in PowerShell. This feature will be introduced in PowerShell 5.0, but for the time being using the System.IO.Compression.ZipFile class can be a nice workaround. The full article  is available on PowerShell Magazine : Compress files and folders with System.IO.Compression.FileSystem class

1
[System.IO.Compression.ZipFile]::ExtractToDirectory('c:testing.zip', 'c:newtest')

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: Compress files and folders with System.IO.Compression.FileSystem class
PowerShell Magazine
External Articles

New article on PowerShell Magazine: Access remote registry using PowerShell

My latest article on PowerShell Magazine is on how to access the registry on a remote system. This is a technique I have used in a number of my scripts, for example: Get-RemoteProgram. The full article containing tips on how to use the Microsoft.Win32.Registry class is available on PowerShell Magazine : Access remote registry using PowerShell

The following example will retrieve the SubKeyNames of HKLM:\System\CurrentControlSet on the Server1 system:

1
2
3
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine,'Server1') 
$RegSubKey = $Reg.OpenSubKey("System\CurrentControlSet")
$RegSubKey.GetSubKeyNames()

Win32RegistryKey

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: Access remote registry using PowerShell
PowerShell Magazine
External Articles
Get-RemoteProgram
My entries in TechNet Script Gallery