[Solved] Powershell & Regex – How to find and delete uppercase characters from file names in directory [closed]

since this got answers, for full clarity: Remove -WhatIf when you’re running it. Get-ChildItem | Rename-Item -NewName {$_.Name -creplace “[A-Z]”} -WhatIf This pipes Get-ChildItem into Rename-Item and then Sets the NewName to be the old name, except we’ve case-sensitively replaced any capital letters with nothing. 3 solved Powershell & Regex – How to find and … Read more

[Solved] Powershell apply a function to each member of a list

try this $perm = $acl.Access | select IdentityReference, FileSystemRights | where {$_.IdentityReference -notin @(“BUILTIN\Administrators”, “NT AUTHORITY\SYSTEM”)} $perm | %{yourfunction $_.IdentityReference} or on the same line $acl.Access | select IdentityReference, FileSystemRights | where {$_.IdentityReference -notin @(“BUILTIN\Administrators”, “NT AUTHORITY\SYSTEM”)} | %{yourfunction $_.IdentityReference} solved Powershell apply a function to each member of a list

[Solved] Detect SMB1 version via powershell for all OSes

I think you are over complicating this and although not tested by me, you could try this: # Computer List $allComputers = Get-Content ‘.\path\to\computers.txt’ # get credentials for domain-joined machines and for local machines $domainCred = Get-Credential -UserName “domain01\admin01” -Message “Please enter the DOMAIN password” $localCred = Get-Credential -UserName “localadmin01” -Message “Please enter the LOCAL … Read more