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 ArticlePSEXEC 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 ArticleNeed 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 ArticleConstruct 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 ArticlePowershell - 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 ArticleGrand 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 ArticleConstructive 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 ArticlePowershell 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 ArticleHelp 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 ArticleGetting 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 ArticleAutomating 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 ArticleCompare 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 ArticlePowershell - 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 ArticlePS 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 ArticlePowershell 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 ArticleA 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 ArticleAdding 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 ArticleCould 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 ArticleHow 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 ArticleHelp 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