Quantcast
Channel: PowerShell
Browsing all 15370 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Extracting field from printer properties tab in powershell?

Hello I am a noob in relation to powershell, I am looking to find a way to extract the contents of the Comments field in the Printer Properties (see picture below).I have found a script to export the...

View Article


Powershell security overview.

There's a good writeup here from David das Neves on powershell security in the enterprise: https://blogs.msdn.microsoft.com/daviddasneves/2017/05/25/powershell-security-at-enterprise-customer...It's a...

View Article


Powershell to check current connections to webserver (IIS) and do an action

Hello my lovely spices, it has been a long time since i have posted/asked something on here. I will be posting more of my scripts and how-to's soon.I am kinda stuck and was wondering if someone could...

View Article

New user script with PowerShell variables

Hi All,Been doing some scripting/digging for this, but I've been unsuccessful in all attempts. I want to write a script that will prompt for each new users attribute. For example, something like...

View Article

PowerShell Group Membership in custom table

Hey all,I am trying to get a snapshot of our current AD using a script I found online with a few tweaks. However, I am a bit stuck. Here is the...

View Article


Copy and send email script

I have been tasked to create a script that will do the following:Copy all files from one folder locally (cd drive) to a server directorySend an email with success/failure notificationThere are 5 folder...

View Article

Monitor A Text File From Windows PowerShell In Real Time with OutPut Text Box

Hi guys !I want to monitor a txt file, for example a pinglog file that write a line each second.i tryed with this command but no results, i can't believe that this is impossible with...

View Article

Using New-MailContact, Set-MailContact, and Set-Contact inside background jobs.

I'm trying to create a vast number of contacts in 365 using a script and would like to run parallel jobs to speed it up, I built a loop inside a job and tested it worked using the following inside the...

View Article


New AD Users Powershell Script

Th script needs to create users in the correct OU with the appropriate Group Memberships.I have already looked on technet and the best I could find...

View Article


i want the output of my powershell in excel file

Hello every body!i made this program : do{$ServerName = Import-Csv -Path "C:\Desktop\importer0.csv"$ping= new-object System.Net.NetworkInformation.Ping$objExcel = new-object -comobject...

View Article

Mapping script for shares

Hi,Basically I am trying to disconnect shares from old DC1 server and map shares on a new DC2 server (having the same permissions and same share names) BAT script runs a PS script (to disconnect...

View Article

Check if a form is already loaded

Hi, i'm trying to check if a form is already loaded ( visible ),if loaded to somethingif not do other thingsPowershellif($form1.ShowDialog()){Write-Host-ForegroundColorMagenta"FORM ALREADY...

View Article

Send text to mobile device

I already have a script that sends an email when a server goes down but I also want to send a text message to a cell phone. How is this possible? I tried this with no luck; Text# specify who gets...

View Article


Powershell to pull users from specific Ou

I need to pull users from a specific OU and check when was the last time they changed their password and wether the password is set to never expire

View Article

how to UnBlock-SmbShareAccess windows server 2012 r2?

Hi,I started to use FSRM to protect shared folders from ransomware.I came up with this command that will block SMB access to the infected user: -ExecutionPolicy Unrestricted -NoLogo -Command "& {...

View Article


How to sort Powershell cmdlet output?

I was tasked with working on a script in Powershell to list any files over 128 MB that were changed in a time frame in a given directory.I found this on a support website for powershell:Get-ChildItem...

View Article

Script to ping multiple machines

Hi all,I found this script and was wondering is it possible to add a line to pick up the machines from the text file as i have more than 70 devices to ping and also after completion then export the...

View Article


Powershell If user is in Group A remove from Group B

I have a parent domain and child domains.  All groups are in the parent domain all users are in the child domain.  The issue is the user in child domain cannot be found.  When I specify users -server...

View Article

Security and PowerShell Modules

I'm fairly new to PowerShell, so I often seek out PowerShell scripts posted on the Internet to accomplish a particular task or at least get me started in creating my own script.On a couple of...

View Article

Good Powershell resources for Linux admins?

I just read this thread:https://community.spiceworks.com/topic/1899922-best-scripting-language-to-know-for-windows-system-ad...Clearly Windows admins recommend PowerShell for any sort of Windows...

View Article
Browsing all 15370 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>