Powershell

1205 readers
1 users here now

PowerShell (POSH) is a a task automation command-line shell and scripting language created by Microsoft. It became part of the FOSS community in 2016 and is now available across Windows, Linux, and macOS

Resources:


Rules:

Self-promotion rules:


founded 2 years ago
MODERATORS
126
 
 
127
 
 

Like the title says. Have you got powershell 7 installed on the machines you connect to or not?

128
129
130
131
132
133
 
 

I know there are a lot of options out there for DMARC report gathering, but as a project to get used to MSGraph API I wanted to write a script to send a csv report of our DMARC mailbox. It includes calls to our password manager to get the connection info for the application I made to interact with graph. It gives a csv that looks like this

I attempted to use a code block to post the directly here, but it didn't want to format correctly so here is the pastebin link

https://pastebin.com/VeZwkZhB

134
 
 

I have seen a lot of calls around Lemmy for more moderation tools. I have been working on Lemmy PowerShell module for a few weeks now, and I went ahead and released a preview version with multiple moderation tools now available. The module has the ability to perform the following tasks using a simple command line tool:

  • Search posts and comments
  • Remove a post
  • Remove a comment
  • Lock and unlock posts
  • Add and remove moderators
  • Create new posts and comments

You can get started now by installing the module through the PowerShell gallery.

Install-Module Lemmy-preview
Import-Module Lemmy-preview

If you are not familiar with PowerShell, I've include detailed instruction in the GitHub repo with lots of example. https://github.com/mdowst/Lemmy-PowerShell

If you run into any issues please let me know either here or by submitting an Issue to the repo.

135
 
 

cross-posted from: https://programming.dev/post/183868

posh-git is a PowerShell module that integrates Git and PowerShell by providing Git status summary information that can be displayed in the PowerShell prompt, e.g.:

example

136
137
 
 

What happens to PowerShell scripts using Azure AD, Azure AD-Preview, or MS Online modules on June 30, 2023?

There will be no impact to PowerShell scripts using these legacy modules on or after June 30, 2023. They will continue to function and be supported until deprecation announcement.

What happens to PowerShell scripts using Azure AD, Azure AD-Preview, or MS Online modules after March 30, 2024?

We plan to deprecate Azure AD, Azure AD-Preview, and MS Online PowerShell modules on March 30, 2024. After this date, the only support offered for these PowerShell modules will be support in migrating to Microsoft Graph PowerShell SDK. Only security fixes will be offered for these PowerShell modules after deprecation is announced. Once these modules are deprecated, they will continue to work for a minimum of six (6) months before being retired.

138
 
 

I've been writing PowerShell code for almost 10 years now, and I love it when I come across someone who uses interesting techniques and patterns that I haven't seen before.

Do any of you have a list of users in the community from which you've taken inspiration in your own code? Who are they? I'd like to follow them :-)

139
 
 

PowerShell Weekly is a hand curated list of PowerShell news, blogs, scripts, etc. that I discover each week and feel are worth passing on. In other words it is not just me reporting everything with a PowerShell hashtag.

There is nothing to sign-up for and there are no ads. It's just my little way of giving back to the community. I also do not accept any sponsored content, but I do take recommendations and suggestions from the community, so feel free to send things my way.

I try to get it published by 9 am US central time (2 pm UTC) each and every Friday. (Expect for the week between Christmas and New Years, I give myself that week off)

It has been going strong for 4 years now and the entire back catalog is searchable and tagged with categories, authors, and timeframes.

140
3
submitted 2 years ago* (last edited 2 years ago) by pwshguy@programming.dev to c/powershell@programming.dev
 
 

I want to make this a place that everyone can get the most out of. So, I've been working on a list of guidelines/rules for this community. Instead of just posting them in the sidebar, I thought I would post my proposed rules here first to provide everyone a change to provide feedback.

So, please let me know if you have any thoughts or suggestions.


Rules:

  • Be civil (aka don’t be a jerk). Remember there are people from all walks of life, all with different levels of expertise. You can disagree with someone, but please be civil when doing so.
  • Adhere to the Lemmy Code of Conduct
  • Follow all programming.dev rules
  • Posts must relate to PowerShell or the PowerShell ecosystem.
  • Use code blocks to make things easier to read.
  • Memes and humorous posts are allowed but try not over do it. And keep them relevant to PowerShell
  • No discussion about piracy or hacking.
  • If someone provides an answer that solves your problem, please reply, so others know what the solution was. ^And^ ^so^ ^the^ ^person^ ^who^ ^suggested^ ^it^ ^gets^ ^that^ ^oh^ ^so^ ^sweet^ ^shot^ ^of^ ^dopamine.^
  • If you find a solution to your problem by other means, please take your time to write down the steps you used to solve your problem in the original post. You can potentially help others having the same problem!

Self-promotion rules:

  • Self-promotion content must be marked as [OC]
  • Do not SPAM. Content must be PowerShell related.
  • Only 10% of your contributions can be self-promotion. In other words, 90% of your contribution must not be self-promotion.
  • Personal blogs are not considered self-promotion, at this time, as long as they are free to access and relevant. Please do not abuse this.

Also, let me know if you are interested in helping moderate this community.

141
 
 

tl;dr the upcoming replacement for PowerShellGet

142
 
 

I started a project to interact with Lemmy via PowerShell. The current code was built off the Lemmy API documentation. This is a very alpha release, so please create issues in GitHub for anything you find. If anyone wants to help contribute to it please let me know.

143
 
 

Not OC

144
 
 

To kick off the new community here is a link to the month PowerShell call and the archive of past calls.

145
 
 

Come in, introduce yourself, and say hello to others. Hoping to build a friendly and helpful community