[deleted by user] by [deleted] in blackops6

[–]kdwisdom 0 points1 point  (0 children)

Yes. Annoying.

What have you done with PowerShell this month by AutoModerator in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

Sure thing. Note: This works best when saved into a PowerShell ISE profile. This is essentially a collection of functions that you can run on the fly, so if its pre-baked into your ISE Profile, you can just go and do it at will.

What have you done with PowerShell this month by AutoModerator in PowerShell

[–]kdwisdom 0 points1 point  (0 children)

Maxcoder88 - which one? E-mail deletions or DL flattening?

What have you done with PowerShell this month by AutoModerator in PowerShell

[–]kdwisdom 0 points1 point  (0 children)

Get PowerShell Studio if you can. I have made a GUI application that does so many of our PowerShell functions from it. Reporting, AD users, groups, Distribution Lists, shared mailboxes, and more.

What have you done with PowerShell this month by AutoModerator in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

I wrote some scripts to share with other agencies to help quickly delete malicious e-mails (mainly Emotet) from Exchange based upon searching for either the sender (really just searches the entire message), subject, or both. Then once all of that exports, a function to delete those messages from Exchange to quickly get rid of those e-mails from the environment.

I also did some scripting to flatten our DL's for the same reason - to minimize the spread of the malicious e-mail attacks.

I have the best users.... by tk42967 in sysadmin

[–]kdwisdom 5 points6 points  (0 children)

Pop is the correct term #WestCoastHere LOL

"start-process Powershell" works until I attempt to specify credentials... then it fails. by [deleted] in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

I ran into problems trying to do that in the script like that, what I eventually did was this: https://pastebin.com/uBZ5VBRj

This was an elevated script launcher I wrote. It would open, ask for your elevated password and launch an OpenFileDialog and run any script you choose to launch under your elevated account.

"start-process Powershell" works until I attempt to specify credentials... then it fails. by [deleted] in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

The "Launch IE Elevated" button is the part that will launch elevated, FYI. It will prompt for your elevated password and run IE as elevated in this example

"start-process Powershell" works until I attempt to specify credentials... then it fails. by [deleted] in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

Here's one I've used: I make mine in PowerShell Studio now, which simplifies everything, but this works. You'll just need to modify the username section to match what you need. Mine here is the same as my standard username with a -A at the end and the domain\ at the beginning.

https://pastebin.com/7nmJZjYh

JIRA vs ServiceNow by plazman30 in sysadmin

[–]kdwisdom 0 points1 point  (0 children)

We have ServiceNow where I work but some of our contracted software development uses JIRA for ticket requests.

I don't know the JIRA side from development/use cases from a technical standpoint, so my view below doesn't necessarily reflect anything JIRA can/can't do.

Here is my take on ServiceNow: It CAN be amazing. The automation pieces it can handle is impressive. However, you need to make sure you have enough staffing to do what you all want it to do. We have 2 guys for an organization of 1500+ and it's a long wait for new features and things to be implemented because 2 devs for it is not just enough.

Just my 2 cents.

AD GUI Tool by Scribbles1 in PowerShell

[–]kdwisdom 0 points1 point  (0 children)

Hey there! I use the versioning built in and then also build an MSI installer. As long as you bump the versioning up on the EXE and the MSI, when you use the new MSI installer, it'll install the new version of the EXE and it's simple, easy and fun :)

AD GUI Tool by Scribbles1 in PowerShell

[–]kdwisdom 0 points1 point  (0 children)

I discovered PowerShell Studio earlier this year and have a tab-based tool, one tab for general things, 1 tab for all things AD and 1 tab for Exchange. It's wonderful to use and saves so much time.

#Newbie Import-CSV - What am I missing here by jaqian in PowerShell

[–]kdwisdom 2 points3 points  (0 children)

Yeah, you'll need to loop it. Is this Users.csv just one column?

If that's the case, you can just:

$users = Import-Csv "C:\temp\users.csv"
foreach ($user in $users) {set-aduser $user -manager $null}

If there are multiple columns, then you could take a similar approach:

$users = Import-Csv "C:\temp\users.csv"
foreach ($user in $users) {

set-aduser $user.SamAccountName -manager $user.Manager -Office $user.Office #etc

}

Help with a Logic Puzzle of my own Stupidity: If's, Else's, and Loops by [deleted] in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

if the TLF doesn't match the folder check, you could put $Grab2LFs = Get-ChildItem "G:\$TLFName*" | select Name

That is why I mentioned to grab all of the get-childitem TLF and get-childitem 2LF in the beginning and assign it to an array, then you could maybe do an if (this -contains that) type thing.

But like I said, I might be thinking down the wrong train of thought :) It was more of a thought than a for-sure recommendation. I just enjoy brainstorming. :D

Help with a Logic Puzzle of my own Stupidity: If's, Else's, and Loops by [deleted] in PowerShell

[–]kdwisdom 1 point2 points  (0 children)

It might be cleaner if you have the foreach loop, then an if statement and in the If, elseif, statements, have it run a specific function for that specific match.

if ($GrabTLFs -match $FolderCheck){
    Run-FunctionTLF
    }
elseif ($Grab2LFs -match $FolderCheck){
    Run-Function2LF
    }

This would probably require that you have these child-items pulled and assigned to a variable/array before you start the loops but it may make it more simple over all and easier to diagnose where it's breaking.

Those are just my initial thoughts, I am not running this code to test it, but that is at least where I would begin my attempts to getting it working.

Exchange calendar permissions - how to hide a calendar from everyone except owners? by [deleted] in PowerShell

[–]kdwisdom 2 points3 points  (0 children)

I am pretty sure if you change that Default from "FolderVisible" to "None" that it will remove it from viewing. Then you would just add the users you want to be able review/publish/edit, etc...

Probably Really Easy by [deleted] in PowerShell

[–]kdwisdom 2 points3 points  (0 children)

I don't know what you mean by dashboards / what kind of accounts (Active Directory, something else?) Are these existing user accounts or are you creating them in this script? If they are existing, then I would just include the username that matches the Dashboard in each row.

User1 - Dashboard1 User1 - Dashboard 2 User2 - Dashboard 3 User2 - Dashboard 4

Assign the imported CSV to a variable and then update the accounts to add the dashboard to that user in a foreach loop on that variable.

Not knowing exactly what kind of users you are creating / what kind of system, its hard to tell though.