Quantcast
Channel: /r/powershell – How to Code .NET
Browsing all 8793 articles
Browse latest View live

Script that will say when the last logon was and who logged on

Hello! I have been looking for a script that will tell me when the last person logged onto a computer and also who logged onto it. I would also like to do this to a list of computers and export the...

View Article


Guys help with the usage of Get-member

I have a if loop I’m using if (($Product -eq 'WebApp' ) -and !(((Get-WebApplication -Name "WebApp").PhysicalPath) -eq $null)) { do-something } else { write-host 'do something else' } Issue is, I’m...

View Article


TIFU By Breaking the PowerShell Core Nightly Build For the 2nd Time this Month

Seriously. #4479 and #4494 both manged to be merged with failing tests due to an issue where the CI tests were reporting passing even though they had failing tests. I’m feeling a disappointed with...

View Article

Script signing best/good practice

I know how to sign scripts. Looking for some guidance on picking a cert to sign it with. A generic company cert? A cert per signer? submitted by /u/SolidKnight [link] [comments] The post Script...

View Article

Need Help with Variable Syntax

I am attempting to automate the creation of users and adding those users into security groups when my employer brings on a new building into our AD. I have the user placed into a variable, and need to...

View Article


Capturing Citrix XenServer performance data with PowerShell

submitted by /u/RyanBijkerk [link] [comments] The post Capturing Citrix XenServer performance data with PowerShell appeared first on How to Code .NET.

View Article

Error Handling… Pls Send Help

I have a script that runs a batch file. The batch file is throwing some errors, but runs successfully. But when the batch file throws errors, the powershell script throws an error. Included in the...

View Article

Stopping Multiple Processes, Some with the same name

Let me start off with, for as advanced as I am in my career with windows, PowerShell is my Achilles heal. I am trying to remedy that. I have a server that is running Solarwinds. Until we can get it...

View Article


Trying to compile this PS script into one batch file.

I created for our end users to update their dell drivers. It works pretty good but instead of having a batch file call a ps1 script I would like to just have it all in the batch file. this isn’t a big...

View Article


Expand Short URL using Powershell

submitted by /u/Prateeksingh1590 [link] [comments] The post Expand Short URL using Powershell appeared first on How to Code .NET.

View Article

Trying to add distro groups from CSV to GAL – seems simple but not working…

Import-CSV C:AddGAL.csv | ForEach {Set-DistributionGroup -HiddenFromAddressListsEnabled $false} My CSV has one column, just a list of the DLs I need to change. submitted by /u/scriptyscriptay [link]...

View Article

NetCease module

submitted by /u/_Emin_ [link] [comments] The post NetCease module appeared first on How to Code .NET.

View Article

Powershell and non powershell commands

So Im building a GUI that when users connect to a remote workstation it polls all this info, one of them happens to be bitlocker. On windows 10 machines I use the get-bitlockervolume command, works...

View Article


[X-Post /r/csharp /r/dotnet] Using Extension Methods in PowerShell

In case anyone is interested…Just wanted to share an example. Any feedback/criticism would be very welcome!...

View Article

Help With Powershell Command Assignment

We are just about to learn about PowerShell in my lectures at University and in this weeks assignment, we were given a list of questions regarding what PowerShell commands do what etc. I really have...

View Article


DSC Resource Kit Release August 2017

submitted by /u/PowerShellChallenge [link] [comments] The post DSC Resource Kit Release August 2017 appeared first on How to Code .NET.

View Article

What, if anything, is your deployment process for scripts/modules internally?

There are lots of great examples and guides for build & deploy processes to the PowerShell Gallery but I am curious what everyone is doing for stuff that needs to be kept in house? Are you hosting...

View Article


(Question) – I’m making some kind of small mistake with this Get-User script.

The script is meant to export the Username, Department, and all security groups that the User is part of. It initially did work for exporting the Username and MemberOf groups – but I tried to add in...

View Article

Get-Weather report using Powershell

submitted by /u/Prateeksingh1590 [link] [comments] The post Get-Weather report using Powershell appeared first on How to Code .NET.

View Article

Will learning JS help me excel in PS?

I have been teaching myself PowerShell for about 9-10 months. I am decent at it, but I could be a lot better. This is really my first language (other than HTML and CSS, and batch files), so I have...

View Article
Browsing all 8793 articles
Browse latest View live