Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 6937 articles
Browse latest View live

command not running

I have this code:$GetBootValue1 = (get-ItemProperty hklm:\SOFTWARE\MGH).OneHourif ($GetBootValue1 = '1') { remove-itemproperty -path HKLM:\Software\MGH -name OneHour | Start-Sleep -s 30 | shutdown.exe...

View Article


Write Output to File and Schedule Script

Hello,I am brand new to PowerShell and need some help.  I was able to execute the following script to export a list of all roles and features on my Windows Server 2008 R2 server: Import-Module...

View Article


ScriptProperty and scope issues

Hello all.  I have what seems to be an odd problem to me.  I'm noticing that if I return a PsObject from a function, the members that are ScriptProperties don't seem to hold their value outside of the...

View Article

Allow users to change their PW

Hello,I'd like to create a PS script that will allow our users to change their passwords.  We don't want to use the 'change pw on next logon' because of other requirements that are enforced.  We'd also...

View Article

Image may be NSFW.
Clik here to view.

Function returns numbers before desired values

Hi everyone,So I have a powershell GUI script where the users input stuff, there is a textbox and 9 comboboxes.Everything works fine, I call the function this way:$return myFunction $param1 $param2...

View Article


PowerShell COM Performance Improved in Windows Server Technical Preview

I was browsing some of my favorite blogs and came across a post by my buddy, David Stein. David writes the Skatterbrainz Blog and always provides some awesome, thoughtful, and frequently humorous...

View Article

How to copy an Active Directory user's group membership to another user's...

Hi, I am new to Powershell but have a requirement to copy the groups that one user is a member of to another user's Active directory account. Unfortunately we do not use and Quest Snap-ins due to...

View Article

Need help with reading dynamic columns from csv file

Hello,I am trying to write a script which will accept dynamic columns. Currently, I am using a discrete number of columns specifying the element number. What I ultimately want is to be able to run the...

View Article


Find disabled users - Remove them from any group they are members of where...

The title pretty much sums up what I'm attempting to script, but...I'm attempting to put together a script that:1. searches for disabled users2. removes any of those disabled users from group that...

View Article


Using test-path to check for file existence in four network directories

I'm trying to test for the existence of a file in 4 unc paths.  Using test-path I know how to check for the existence in one unc path as such:test-path \\networkshare\folder\file.txtHow would I go...

View Article

Exchange 2013 Script to remove Resigned Users from all the DL's in organization

Hi,I am trying to write a script that will do the following tasks:1) Members of DL named "Resigned" to be removed from all the other DL's in the organization except DL "Resigned". 2) Later I need to...

View Article

Generate a password for a new AD account

Hello,I am trying to create a script that will create a valid UID after performing a check of AD and a File of previously used UIDs. If it finds a match then it would try the next number. Example Trys...

View Article

(Get-ADGroupMember).name not working

I have an AD Group called SSOPilot.  I want to find out all the users in this group.  If I run this command it works.  Get-ADGroupMember SSOPilot -Recursive but it returns far too much...

View Article


Add-ADGroupMember

$users = Get-Content "c:\tools\PILOTUsers.txt"foreach ($user in $users) { Add-ADGroupMember SSOPilot $users} I run this on a .TXT file that has many users in it.   It says:  Add-ADGroupMember : The...

View Article

Copy-Item Protocol?

Hello Experts, Does anyone know exactly what Copy-Item uses for file transfers?

View Article


Restart Server or Service with additional privileges

We are planning to reduce number of tickets to IT dept. for service & server restart requests - but, users don't have addtional access for production serverPlan is to share a common account which...

View Article

Powershell and Hardware firmware version

Hello, I'm looking for a way to generate an output of the hardware firmware version of devices: NICILODisk Arraymotherboard etc....I assume using the Get-WmiObject will get me there but from there I am...

View Article


The Case for PowerShell

Mark Minasi teaches why you should Learn-PowerShell so you needn't Leave-Industry.Read More

View Article

Updating and changing AD user properties with powershell

Hey guys, This is my first time posting here. My powershell skills are beginner at best and I am trying to tackle a big project. I have been tasked to update the corporate phone directory for all of...

View Article

Groups in Office365

Hello, I have a AD connect to office 365 with DirSync, perfectly synchronized(Users,Groups...).Also, inoffice365I createdgroupsdirectly from the platform (No connect with my domain) and when i try get...

View Article
Browsing all 6937 articles
Browse latest View live