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

Powershell if-else statement

Hi,I have the following power-shell script but it's not printing any results for me.What I would like to do is query the wifi profiles available on a pc then print True if the result of the wlan...

View Article


PSEXEC Script with Powershell variables

Essentially I am trying to use PSEXEC to put a file on a computer and run it to uninstall flash. I believe this could also be completely written in PS but at the moment PSEXEC was easier. I use...

View Article


Need a PS script for getting the users list

Need a PS script for getting the users list where it matches the below 2 conditions:1. Query users where their email address ends with *xyz.com2. Check whether all the queried users are part of AD...

View Article

Construct a path

Here is what I'm trying to accomplishGet the user from ADPowershell$Utilisateur=(Get-ADUser-Identity$ObjectName-PropertiesGivenName,SurName)Then set two other...

View Article

Powershell - Is this possible

It's a quiet Saturday afternoon and i'm wondering if the following would be possible.Recently i found a bit of code that generates a folder browser dialog window which i'd like to alter to allow me to...

View Article


Grand Rapids Michigan PowerShell User Group

Hey all,@dotps1 and myself are launching the Grand Rapids PowerShell User Group (GRPosh) this week. Would love it if there are any of you local SpiceWorks PowerShellers that would like to join...

View Article

Constructive Script Criticism

Good evening all,Tragically this tiny script took me about an hour and a half to write, so I was looking for some tips to improve it and would appreciate any input.Powershell#The...

View Article

Powershell Script to copy files, but only overwrite if source newer......

Hi all, I'm new to powershell and looking to create a script that will do the following:It needs to copy all files from my F:\ Drive to the Z:\ Drive with the following conditions:- Retains file...

View Article


Help adding columns to exported information from AD

I am using a very basic script to export a list of expiring accounts in AD. Is there a way to get the description listed on these accounts to be in the exported file? I know that description isn't a...

View Article


Getting ADusers Extra Columns

I'm getting some extra columns that i really do not need. Here is a list of what i get. Enabled GivenName Name ObjectClass ObjectGUID SamAccountName SID State Surname UserPrincipalName...

View Article

Automating a Delete, Folder Creation, and File Copy

Every time we update our ERP client software, a manual delete and recreation of a folder, followed by a copy and paste of a custom .ini file has to be done. This folder exists in C:\Users\Username\ and...

View Article

Compare two Directory Size and count

This script is great It shows the size, count and file type of directory you want, however when I tried to add second One more directory as $directory="F:\"$directory2="G:\" It doesn't seems to workThe...

View Article

Powershell - Reboot all PCs in text file

https://community.spiceworks.com/scripts/show/3588-reboot-mutliple-pcs-from-text-fileI made a quick and simple little script that reads a text file (a very simple file, just type the name of the PC,...

View Article


PS Switch Issue

I'm currently parsing database names and generating Excel columns based on certain qualifying conditions within the database name. Up until this point, i've been using nested IF statements such as...

View Article

Powershell Setting ACL's During Folder Creation

Good Morning.I am continuing on with my project of creating some personnel folders on the network to start making electronic files for everyone.I am pulling this information out of AD and creating user...

View Article


A Simple Administrative Task That can be done with PowerShell

I need to come up with a simple administrative task that can be ran in PowerShell. I need to write a script, in stages. It would be written for multiple computers.

View Article

Adding rows to a PSObject

Hi all,So I need to pull a report of distribution groups on exchange online.I need to make a CSV that contains the DL Email, The members (there will only be 1) First Name, LastName and...

View Article


Could use some help w Powershell script

Note:-the Start-Service, and the Get-Service commands below work for me.-a portion of the "FOR" statement displays in the PS console however neither the email nor the text are sent, it just keeps...

View Article

How to verify Powershell commands before I run them on a production Server?

Is there any method of verifying the accuracy of Powershell commands before they are run on a Server? I am fairly new to Powershell and sometimes I can get what it needs me to do, there are other...

View Article

Help requested for Powershell script syntax

TextNote: -the Start-Service, and the Get-Service commands below work for me. -a portion of the "FOR" statement displays in the PS console however neither the email nor the text are sent, it just keeps...

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>