Hil

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 43 total)
  • Author
    Posts
  • in reply to: Running a javascript command using powershell #271741
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    You can explore the $browser object. There should be some property/method which will give you the data. If its an Internet Explorer COM object, it will be like $browser.document

    Thanks. Although it does not show.  See https://www.freepik.com/profile/login

    So, I just trying to run the command using powershell. I am not asking to convert the command to powershell.

    I want to call the same javascript command using powershell. I know there are ways to do this, but I not able to get the syntax right.

    • This reply was modified 1 week, 3 days ago by Hil.
    in reply to: Running Get-ExchangeCertificate using a remote session. #260427
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    Thanks Doug. That was exactly what I needed. Worked like a charm !!!!!!!

    I answered a similar question on Reddit three days ago.

    Trouble getting Exchange certificate information remotely, looking for workaround from PowerShell

    There is a script written that will import the full exchange environment. It will allow Get-ExchangeCertificate to return the certificate domains property remotely.

    https://gallery.technet.microsoft.com/Import-ModuleExchange-010da141

    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    The only thing I see in the code is that ‘Continue’ is spelled incorrectly.

    Outside of that, you many need to find a forum specifically for Selenium as asking about usage is a bit to broad of an audience.

    Yes sorry for the CONTINUE. This code is part of a larger code, so I had to put in just the lines that were relevant and messed up the continue. That was not the cause of concern through. It was the ScrollIntoView() that was the problem.

    I did go through other sites and I did find scripts in other languages for the same issue, but I was not able to convert them to powershell  or get the necessary component to run correctly … Like:

    https://sqa.stackexchange.com/questions/9655/not-able-to-scroll-down-page-using-selenium-webdriver

    https://intellipaat.com/community/16503/how-to-scroll-to-element-with-selenium-webdriver-using-c

     

    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    I think this may help you.

    <textarea class=”ace_text-input” style=”opacity: 0; height: 18px; width: 7px; left: 254px; top: 0px;” spellcheck=”false” wrap=”off”></textarea>

    1
    2
    Get-RoleGroup | Select-Object ExpandProperty Name | Sort-Object
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks Doug. Works great.

    Took it a step further to extract some of the needed sub components

    Get-RoleGroup | select-object SamAccountName, Identity, managedby, members, Roles, RoleAssignments

    in reply to: Read emails in a shared mailbox using an admin account #219792
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    Do you have permissions for this other mailbox? I don’t even want to try and read through that code. Is there any specific reason you’re trying to get it from exchange web services instead of say Outlook?

    Its fixed. Thanks though.

    in reply to: Read emails in a shared mailbox using an admin account #213282
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    I managed to define the shared mailbox. That fixed it.

    in reply to: Extracting Webpage #209037
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    You could try show-object

    https://devblogs.microsoft.com/scripting/spelunking-with-show-object/

    I need to extract a webpage. Not sure if this helps but thanks.

    in reply to: Remove a Distribution List Owner via powershell #198365
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    Loop not required, just check if the object is in the array

    if ($list -notcontains (Get-RemoteMailbox $Admin_Alias).identity) {$NewList += $list}

    Thanks Rob. Unfortunately that does not remove the admin from the list. If the admin is in the list, all admins are stripped. Also I would still end up with 4 lines of code.

    in reply to: Remove a Distribution List Owner via powershell #197210
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    Thanks Olaf.

    I finally got it to work.

    $DL_Alias = ‘[email protected]
    $Admin_Alias = ‘[email protected]
    $lists = (Get-DistributionGroup $DL_Alias).ManagedBy
    $NewList = @()
    foreach ($list in $lists) {if ($list -ne (Get-RemoteMailbox $Admin_Alias).identity){$NewList += $list}}
    Set-DistributionGroup $DL_Alias -ManagedBy $NewList

    Any way I could get this in a single line of code (other than the 2 valiables lines). I was hoping to pass variables via Excel.

    If not that fine.

     

    • This reply was modified 10 months, 3 weeks ago by Hil.
    • This reply was modified 10 months, 3 weeks ago by Hil.
    • This reply was modified 10 months, 3 weeks ago by Hil.
    • This reply was modified 10 months, 3 weeks ago by Hil.
    • This reply was modified 10 months, 3 weeks ago by Hil.
    in reply to: Remove a Distribution List Owner via powershell #197066
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    Thanks Lars.

    Unfortunately it gives the same error on the line $List = $List – $New
    Error: “does not contain a method named ‘op_Subtraction'”

    in reply to: Remove a Distribution List Owner via powershell #197039
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    This worked for me, but a **long** time ago, probably Exchange 2010 or so….

    $Alias = ‘DL_ALL_In_Company’

    $NewMGR = ‘Joe Smith’

    $DG = Get-DistributionGroup $Alias

    $List = $DG.ManagedBy

    $New = Get-Mailbox $NewMGR

    $List += $New

    Set-DistributionGroup $Alias -ManagedBy $List

    This script would add an owner. That part already works for me.

    I need to be able to REMOVE an owner  from a DL (not mailbox) via powershell.

     

    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    No Worries Olaf and thanks again for the Powershell command.

    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    Thanks Olaf.

    Your suggestion works great.

    Although I was hoping to get the “-Filter” to work as that would be a lot faster than doing it the other way around, especially since we have 50,000 users and they are in the Cloud. If you have any other ideas, please let me know

    Thanks

    Hil

     

    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    No worries. I figured it out.

    Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where {(($_.TotalDeletedItemSize -split ” “)[0]) -gt 10}

     

    in reply to: Get mobile devices for cloud users #146814
    Hil
    Participant
    Topics: 33
    Replies: 43
    Points: 245
    Rank: Participant

    No. When I have the command as “Select-Object -First 10” and the scripts returns 10 items it means the script is complete and should return to the prompt but it just sits there.

    Its just a single line of powershell code, so there should be no error in the line itself. Try it out. you will see what I mean.

Viewing 15 posts - 1 through 15 (of 43 total)