PowerShell Module SysInfo v1.2.0

A new update of the module is here. It is being a while to write a post but I a back now. I have updated module to PowerShell Module SysInfo v1.2.0.

For those who have not seen the information about SysInfo module, you can find it here.

Let’s see the updates of this version.

Updates:

Added Credential parameter

Added Authentication parameter

Properties are now sorted in alphabetical order

Some internal functions have been renamed

Code improvements

Bug fixes

[adinserter name=”In Article”]

Credential Parameter

Credential parameter allows you to connect to a remote system a get the information without the need of running PowerShell with the specific user that has access to that machine.

Until version 1.1.3, in order to get the information from a remote system, you had to run PowerShell as the user that has access on that system. This version eliminates this issue. You are able to run PowerShell with any user that you want. When there is a need to get information from a system that your user does not have access to, you just need to use the credential parameter. Check the example.

Example 1

As you can see in the example below, by using the credential parameter, I am able to retrieve the local disk information.

PS C:\> Get-LocalDisk -ComputerName Server1 -Credential domain\admin_user DeviceID : C: DriveType : Local Disk FreeSpace : 34376413184 FreeSpacePercentage : 65 ProviderName : Size : 53092544512 SystemName : Server1 VolumeName :

[adinserter name=”In Article”]

Authentication Parameter

In addition to the credential parameter, I have added also Authentication parameter. This parameter will allow you to specify the authentication mode that you like to use in order to connect to the remote system. you are not able to use Authentication parameter if Credential parameter is not used.

Authentication is able to accept the specific values:

Default

Digest

Negotiate

Basic

Kerberos

NtlmDomain

CredSsp

The below information is provided by Microsoft:

You cannot use the NtlmDomain authentication type for connection to the local computer. CredSSP authentication is available only in Windows Vista, Windows Server 2008, and later versions of Windows. https://docs.microsoft.com/en-us/powershell/module/cimcmdlets/new-cimsession?view=powershell-6

Caution: Credential Security Service Provider (CredSSP) authentication, in which the user’s credentials are passed to a remote computer to be authenticated, is designed for commands that require authentication on more than one resource, such as accessing a remote network share. This mechanism increases the security risk of the remote operation. If the remote computer is compromised, the credentials that are passed to it can be used to control the network session. https://docs.microsoft.com/en-us/powershell/module/cimcmdlets/new-cimsession?view=powershell-6

Check the example below.

[adinserter name=”In Article”]

Example 2

In the example below I will use the same server and cmdlet using the same credentials with different authentication method.

PS C:\> Get-LocalDisk -ComputerName Server1 -Credential domain\admin_user -Authentication Kerberos DeviceID : C: DriveType : Local Disk FreeSpace : 34376404992 FreeSpacePercentage : 65 ProviderName : Size : 53092544512 SystemName : Server1 VolumeName :

Example 3

In this example I am using Negotiate value for authentication in order for the client and the server to negotiate what is the best way to establish the connection.

PS C:\> Get-LocalDisk -ComputerName Server1 -Credential domain\admin_user -Authentication Negotiate DeviceID : C: DriveType : Local Disk FreeSpace : 34376404992 FreeSpacePercentage : 65 ProviderName : Size : 53092544512 SystemName : Server1 VolumeName :

[adinserter name=”In Article”]

Properties Order

When you use * to get all properties of the specific information, properties are now sorted in alphabetical order to find them easier.

Check the example below

Example 4

As you can see below all properties of the local disk information are sorted alphabetically.

PS C:\> Get-LocalDisk -ComputerName Server1 -Credential domain\admin_user -Properties * Access : Availability : BlockSize : Caption : C: Compressed : False ConfigManagerErrorCode : ConfigManagerUserConfig : Description : Local Fixed Disk DeviceID : C: DriveType : Local Disk ErrorCleared : ErrorDescription : ErrorMethodology : FileSystem : NTFS FreeSpace : 34376392704 FreeSpaceGB : 32.02 FreeSpaceKB : 33570696 FreeSpaceMB : 32783.88 FreeSpacePercentage : 65 InstallDate : LastErrorCode : MaximumComponentLength : 255 MediaType : Fixed hard disk media Name : C: NumberOfBlocks : PowerManagementCapabilities : PowerManagementSupported : ProviderName : Purpose : QuotasDisabled : True QuotasIncomplete : False QuotasRebuilding : False Size : 53092544512 SizeGB : 49.45 SizeKB : 51848188 SizeMB : 50633 Status : StatusInfo : SupportsDiskQuotas : True SupportsFileBasedCompression : True SystemName : Server1 UsedSpacePercentage : 35 VolumeDirty : False VolumeName : VolumeSerialNumber : E07896D6

Other Changes

Other changes that have been made in this version is the code improvement to improve stability and speed, bug fixes and renaming of some internal functions in order to avoid any conflicts with default system cmdlets.

PowerShell Module Cmdlets List

Once more I am providing you below the list of all cmdlets included currently in the module.

Hope you like SysInfo module and the additional features.

You feedback and recommendations are appreciated.

If you have any questions or anything else please let me know in the comments below.

[adinserter name=”In Article”]

Related Links

[adinserter name=”Matched-Content”]