Search found 210 matches

by ITEngineer
Mon Aug 13, 2018 3:22 am
Forum: PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?
Replies: 4
Views: 1246

How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?

I need some assistance to modify the script below to display one more column called PrimarySmtpAddress : Get-MailboxDatabase -Server SITE3SVR-EX01 | Get-Mailbox -ResultSize Unlimited -Database "PRODSITE3-DB" | Get-MailboxStatistics | Select DisplayName, MailboxType, ` DatabaseName, ` ServerName, ` @...
by ITEngineer
Thu Aug 09, 2018 8:58 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Re: Unable to query remote registry using PowerShell script

So how is it possible to show the column name of the Computer after modifying the script like below: Get-ADComputer -Filter {Enabled -eq $True} -SearchBase "DC=Domain,DC=com" | Where-Object {Test-Connection $_.Name -Count 1 -Quiet} | Select-Object -Property Name | ForEach-Object { Get-OfficeVersion ...
by ITEngineer
Thu Aug 09, 2018 8:52 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Re: Unable to query remote registry using PowerShell script

function Get-OfficeVersion{ param( [string]$ComputerName = $env:COMPUTERNAME ) # code to extract Word/Office version $hive = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('localmachine',$ComputerName) if($key = $hive.OpenSubKey('Software\Classes\Word.Application\CurVer')){ $wordApp = $key.GetVal...
by ITEngineer
Wed Aug 08, 2018 11:52 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Re: Unable to query remote registry using PowerShell script

You cannot use the DN for most commands. Test-Connection cannot use the DN. The registry cannot use the DN. OK, I have now updated the script with $_.Name , somehow I got this error: Else : The term 'Else' is not recognized as the name of a cmdlet, function, script file, or operable program. Check ...
by ITEngineer
Wed Aug 08, 2018 11:13 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Re: Unable to query remote registry using PowerShell script

What is the output from this line? Write-Host "Processing $($_) ..." The Distinguished name of the laptops: Processing CN=WS001234,OU=Laptop Users,DC=MyDomain,DC=com ... Processing CN=WS003454,OU=Laptop Users,DC=MyDomain,DC=com ... Processing CN=WS004241,OU=Laptop Users,DC=MyDomain,DC=com ... ....
by ITEngineer
Wed Aug 08, 2018 10:07 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Re: Unable to query remote registry using PowerShell script

jvierra wrote:
Wed Aug 08, 2018 10:03 pm
You need to fix it everywhere.

Run in the debugger and check all lines to see your mistakes.
There is no error in compiling the script, but somehow the result is not shown.
I need some help hence I post in this forum :cry:
by ITEngineer
Wed Aug 08, 2018 8:46 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Re: Unable to query remote registry using PowerShell script

jvierra wrote:
Wed Aug 08, 2018 7:22 pm
In your code "$_" is an object and not a name.
OK, I have amended into $result.ComputerName = $_.Name

However, the result is still blank?
by ITEngineer
Wed Aug 08, 2018 6:57 pm
Forum: PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 2261

Unable to query remote registry using PowerShell script

People, I need some help in fixing the below PowerShell script to collect the MS Word version in the few select PC in certain OU: Get-ADComputer -Filter {Enabled -eq $True} -SearchBase "OU=Laptop Users,DC=MyDomain,DC=com" | Where-Object {Test-Connection $_.Name -Count 1 -Quiet} | ForEach-Object { Wr...
by ITEngineer
Wed Aug 08, 2018 3:56 pm
Forum: PowerShell
Topic: How to get the value of currently installed MS Word version using PowerShell?
Replies: 3
Views: 1008

Re: How to get the value of currently installed MS Word version using PowerShell?

jvierra wrote:
Wed Aug 08, 2018 4:34 am
(Get-ItemProperty HKLM:Software\Classes\Word.Application\CurVer).'(default)'
Cool, many thanks for the assistance in this matter Mr. Vierra. :D
by ITEngineer
Wed Aug 08, 2018 12:34 am
Forum: PowerShell
Topic: How to get the value of currently installed MS Word version using PowerShell?
Replies: 3
Views: 1008

How to get the value of currently installed MS Word version using PowerShell?

Hi People, I tried to get the value of the registry entry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Application\CurVer (Default) with this command: Get-ItemProperty -Path 'HKLM:Software\Classes\Word.Application\CurVer'.(default) But not sure how to get the returned value? (default) : Word.Ap...