Mike Kanakos commented on
SecretsManagement module for PowerShell: Save passwords in PowerShell 1 year, 7 months ago
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.
Mike Kanakos commented on
SecretsManagement module for PowerShell: Save passwords in PowerShell 1 year, 7 months ago
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
Mike Kanakos wrote a new post,
SecretsManagement module for PowerShell: Save passwords in PowerShell 1 year, 7 months ago
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 1 year, 8 months 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, 9 months agoMike Kanakos commented on
Finding nested Active Directory groups faster with PowerShell 1 year, 11 months 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?
Mike Kanakos wrote a new post,
Finding nested Active Directory groups faster with PowerShell 1 year, 11 months ago
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.
Mike Kanakos commented on
PowerShell script to display information about Active Directory users 2 years, 2 months ago
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.
Mike Kanakos commented on
PowerShell script to display information about Active Directory users 2 years, 2 months ago
I am sorry Vishal. I am not sure how to make a connection to a SQL database.
Mike Kanakos commented on
PowerShell script to display information about Active Directory users 2 years, 3 months ago
Turil,
I believe your getting this error because your running a constrained language mode session. I may be wrong but this article is a useful for troubleshooting
https://community.spiceworks.com/topic/1451109-srp-whitelist-causing-odd-behavior-in-powershell-v5
Mike Kanakos wrote a new post,
Monitoring Active Directory with the PowerShell module PSADHealth 2 years, 6 months ago
PSADHealth is a PowerShell module built to automate Active Directory health checks that should be done on a regular basis.
Mike Kanakos commented on
PowerShell script to display information about Active Directory users 2 years, 7 months ago
Hi Dexter…. Let me see if I can answer your question…
Are you asking… How do I run this function for one user ?
Are you asking… How can I make the function prompt for a username to enter?The default parameter of the function is username and it is a required parameter. If you run the function with no input, it will require you to enter a username…
Take a look at the link below… I ran the function with no input and it prompts me for a username.
Mike Kanakos liked comment of Nelson Montes de Oca on Invoke-Command: Connecting to computers requiring different credentials. (So far, Nelson Montes de Oca has 1 likes for this comment.) 2 years, 7 months ago
Mike Kanakos liked Windows Server 2016/2019 Group Policy security settings. (So far, This post has 2 likes) 2 years, 7 months ago
Mike Kanakos liked Audit changes in the Windows registry. (So far, This post has 2 likes) 2 years, 7 months ago
Mike Kanakos wrote a new post,
Invoke-Command: Compensating for slow responding computers 2 years, 7 months ago
Sometimes, running remote code with the PowerShell cmdlet Invoke-Command can take a long time to run—and not for any reason having to do with your code itself. Connecting to older computers means that long bits of code take longer to run. Computers on the other side of slow WAN links will always be slower in responding than something close and well connected.
Mike Kanakos liked comment of Michael Pietroforte on Author and member of the year 2019 – Why DevOps still doesn’t rule the IT world. (So far, Michael Pietroforte has 1 likes for this comment.) 2 years, 7 months ago
Mike Kanakos commented on Author and member of the year 2019 – Why DevOps still doesn’t rule the IT world 2 years, 7 months ago
Congrats to Wolfgang Sommergut for a great year of work! 37 articles are a huge volume of writing.
I should also note it that Wolfgang, Adam Bertam, Vladan Seget combined for 120 articles this year. Congrats on all the writing! Quality work from an outstanding group of writers.
Mike Kanakos liked comment of Anthony Rawlings on Invoke-Command: Connecting to computers requiring different credentials. (So far, Anthony Rawlings has 1 likes for this comment.) 2 years, 7 months ago
- Load More