• Hi CB

    You can add HTML to the body of the email and embed a logo. I'll see if I can find a working example for you.

  • Hi Kevin,

     

    I too still use Send-mailmessage. There is a .net alternative but i need to do some research into that before i can share how to use that code. 

  • Mike Kanakos liked the comment of Dave on A password expiration reminder script in PowerShell. (So far, Dave has 2 likes for this comment) 5 months, 3 weeks ago

  • Mike Kanakos liked the comment of Manukumar K M on Invoke-Command: Connecting to computers requiring different credentials. (So far, Manukumar K M has 1 likes for this comment) 6 months, 3 weeks ago

  • I don't think I quite understand your setup, so more info is needed but ultimately your issue may be past the scope of this forum. 

    • If you have your printers setup to use print queues from network servers, then the printers are not available to print if the print queues are not online. 
    • If you are saying that your DC is down, well.... that's a bigger problem.

    Otherwise, the conversation between client and printer should not be reliant on the GPO settings after the printer is configured via GPO. 
     

  • don't want to prompt user from time to time for the master password. 

    Hi Sylvia,

    This is probably the most common question I get with secrets mgmt. 

    Short Answer:
    Yes! There are options to solve your issue but they come with a serious reduction in security

    Long Answer:
    You can configure the local vault to have no master password and you can also configure the vault to not be stored in the AllUsers profile instead of inside a specific user profile. Those two settings are not coupled together, meaning you can do one, or the other, or both. However, you are seriously reducing the security when you enable these options. 

    Some extra info to consider...

    This solution from Microsoft has an intended use: password mgmt for a user. If you need more options to support things like automating scripts without user interaction, then the long term answer is a 3rd party vault or AZ KeyVault, which have better authentication methods.

    The SecretStore vault was built to fill a need for users who are struggling managing passwords on their local systems. A cloud based vault will have better options and choices. That is why there are multiple vaults available that work with the SecretManagement module. Pick the right one for the task, instead of trying to bend the SecretStore vault to your needs.. 

    One last point... 
    There is talk in the community of using a certificate as the AUTH method for a local password vault. This would solve your problem AND ALSO maintain a high level of security but it doesn't exist as of the time of this comment... 

    Hoped that helps!

     

  • Hi Tiziao,

    Group Policy handles getting the printer to appear on your machine. Once that occurs, GPO is not involved in printing anymore except for refreshing the printer on your machine.

    Printing works directly between client (computer) and print queue or client (computer) and Printer (direct IP printing) depending on your config. 

  • Hey BigBear!

    So a few things to keep in mind. This article was written for preview6 and now the module is a release candidate. When it was preview version you would need to search with a special tag in order to find the prerelease versions. That's no longer necessary. Here's some commands you can use to help you along.

    Finding modules to install:
    find-module -tag "secretManagement"

    Set Default Vault (only can be run after the credman vault module is installed:
    Set-DefaultVault -Name CredMan

    If you have more questions, reply here. Also, I did a live demo of these modules a few weeks ago. If you would like to watch the video, then visit this link:

  • I haven't tried the Bitwarden module yet but looking at the maintainers github site, it says you need to  install the BitWarden-CLI for the extension to work properly. 
     

    Did you install the Bitwarden CLI ? 

  • Hi Cameron. Sure I can point you in the right direction!

    My customized cmd prompt will be the next set of articles on 4sysops. I am finalizing the write-up but right now it is a long article (almost 3000 words), so we'l probably split it up into a series of smaller reads. 

    So, just hang tight and you should see the articles in the next week or two (depending on holiday posting schedule). 

  • Cameron,

    I ended up writing extensively about customizing your PowerShell command prompt at my site. The reason for this is that the post is very detailed and longer than the posts we usually do on 4sysops. If you would like to know more check out my article here:
    https://www.networkadm.in/customize-pscmdprompt/

  • Hi Wena,

    I think you may be talking about Credential Manager in GUI. This is different than credential mgr and the secrets saved through this module wont appear in the Credential Mgr in the Windows GUI. 

  • Hi David. Yes searching for the module can be problematic. Use the syntax I included in the article.

    The syntax below finds a match when I search by specific name from PS7

    $params = @{
        Name              = 'Microsoft.PowerShell.SecretManagement'
        AllowPreRelease   = $true
        Repository        = 'PSGallery'
    }
    Find-Module @Params

     

  • Microsoft has released a new version of the SecretsManagement module for PowerShell. Version 6 of the SecretsManagement module makes it simple to encrypt and store passwords and then recall them easily on demand. I’ll show how it works and how you can incorporate this tool into your daily scripting workflow.

  • Mike Kanakos's profile was updated 11 months, 3 weeks ago

  • Mike Kanakos liked the comment of Leos Marek (Rank: Level 4)
    on Invoke-Command: Compensating for slow responding computers. (So far, Leos Marek (Rank: Level 4)
    has 1 likes for this comment) 1 year ago

  • Hi Mike, 

    I saw the github issue you opened. Thank you for reaching out. I am going to paste my response I left on github here as well. 
     

    so let's go through the question together.... for those unfamilar with the issue Mike raised. you can look here:
    https://github.com/compwiz32/PowerShell/issues/7
     

    I believe lines 115-124 should be inside of the foreach loop bound by lines 111-113

     

     If ($null -ne $NestedQueryResult) {
                        foreach ($SubGrp in $NestedQueryResult) {
                            $SubGrpLookup = Get-ADGroup -Identity "$($SubGrp.DistinguishedName)" -Properties Members, CanonicalName -Server $Server
                        }
    
                        $SubNestedGroupInfo = [PSCustomObject]@{
                            'ParentGroup'            = $NestedADGrp.Name
                            'NestedGroup'            = $SubGrp.Name
                            'NestedGroupMemberCount' = $SubGrpLookup.Members.count
                            'ObjectClass'            = $SubGrp.ObjectClass
                            'ObjectPath'             = $SubGrpLookup.CanonicalName
                            'DistinguishedName'      = $SubGrpLookup.DistinguishedName
                        } #end PSCustomObject
    
                        $SubNestedGroupInfo
                    }
    

    I am sorry the line numbers dont line up, but i copied lines 110-125 here....

    this IF loop is only used if there is a nested group found in the earlier lookup...

    • it says IF NOT NULL then continue...
    • then it says foreach group in $nestedqueryresult > do the $subgrouplookup
    • then we create an pscustomobject
    • then we return the object
      ... and then it goes back through the foreach if there are more nestedgroups in $nestedqueryresult

    if I move object inside the foreach, then the next time the loop runs, it will overwrite the first result (if there are more than one).

    PowerShell keeps track of the pscustomobject for me. When I come through the second time, it adds to the existing results on output. It took me a long time to understand that logic, but that's Powershell stepping in and doing the work for me ... the next run of the loop ADDS to $SubNestedGroupInfo - it doesn't overwrite it. 

    does that make sense?

  • Finding nested groups in large Active Directory groups can be a challenging task. Active Directory includes the cmdlet Get-ADGroupMember for finding group members, but it cannot be used to query groups with over 5000 members. The cmdlet also suffers from performance bottlenecks. I'd like to share with you a tool I built that solves both those problems.

  • Vishal,
     

    There are plenty of article (probably some on this site) that discuss connecting to SQL. Connecting to a SQL instance is also not hard but outside the scope of the original article and not something I am going to comment on here. 

    Saving the data to a file is an easy task. Look at export-csv or out-file cmdlets. Leos' examples are exactly correct. if you need help with saving data, then you need to be more specific. However, we are far from a relevant discussion that relates to this article. 

     

  • I am sorry Vishal. I am not sure how to make a connection to a SQL database. 

  • Load More
© 4sysops 2006 - 2021

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account