Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Script to pull Server, Groups (& nested groups) and Members and save as...

I'm a noob and need a script pretty quickly so some help would be greatly appreciated.  I am auditing server access across several domains at my company.  I would like to get a csv file showing every...

View Article


How to read a file name in Powershell

How to read the file name "Test_YYYYMM.txt" ,We need to read based on YYYYMM and it will not be a System date. it created by Manually. Example: In May 2016 it has to read Apr 2016 and on Jan 2016 it...

View Article


row count on table header running sql

Hi I am using the following code to execute a query and have the result sent to the email in html format. But in the email i am automatically receiving a row count on top of the table. How to either...

View Article

Powershell - Search for AD Computer

Hi, I have made this script for search for the AD computers, but it doesn´t work.What should I change?Thanks.$startDTM = (Get-Date) $path = Split-Path -parent "C:\a" $logdate = Get-Date -Format...

View Article

make a skript with a login with 3 user

hello togetheri got a short questionmy Goal is it to make a Skript with 3 users that have to Login.this 3 users got 3 different Passwords.is it now possible to make a Skript which 3 users can Login...

View Article


how to add certain string to the text file

Hello guys, Could you please tell me how to add a string to the particular part of the text file. Then I need to add another string after found string and save the file.foreach ($server1 in...

View Article

how to add a string to the particular place of the text file

Hello guys, Could you please tell me how to add a string to the particular part of the text file. Then I need to add another string after found string and save the file. foreach ($server1 in...

View Article

Assistance required in powershell script to list the history and status of...

Hi People,I've got this script which display the result of theServer name, Scheduled Task name and theService Account Name running fine but I also need to show the Last running time, Status/Result.The...

View Article


Import-Csv using .ps1 script

Hi,I am having issues importing user csv scripts into Active Directory. I created a couple csv scrips with de headers Name,SamAccountName,OU,Password.I am trying to import these scripts using...

View Article


Strange behaviour of Powershell on one DC

Dear all,Recently I've add new DC to infrastructure (in the same way like other DC's). Cause it is the closest DC for me very often I am using it to for Powershell with ADModule jobs to do.What is...

View Article

Issue modifying local security policy with secedit

I'm having an issue modifying local security policy on my machine using SECEDITWhen I run:secedit /export /cfg c:\temp.cfg /areas SECURITYPOLICYI get a copy of the configuration just fine.However, when...

View Article

Applocker cmdlet - Set Enforcement

Using AppLocker on Windows Server 2012 R2, and would like to know if there are any cmdlets that allow you to set the enforcement rules (Audit Only, Enforce rules)?  If not, is there a way to do it via...

View Article

Display Popup from script executed as System user

Hi,I've a scheduled task, executed by System user. It's can sometimes display a popup to interacts with the user. This work fine if i launch the script myself, but not displaying when launched by the...

View Article


GetChildItem count returns null if there is one file in a folder

Hey folks.  I'm an absolute newbie with PS so please forgive me if this question is ridiculously basic.  I'm using the following code to see if a folder has files in it:$imagefiles = Get-ChildItem...

View Article

change property in an object.. how?

read above

View Article


Powershell skips TotalItemSize and only exports Name.. short script but not...

Hi, so my main goal is to find the size of a public folder in Outlook. I have a very simple script;PS C:\WINDOWS\system32> Get-PublicFolder -Recurse -ResultSize unlimited | Select...

View Article

AD delegation rule not applying

I am designing a Powershell GUI to set AD delegations on various OUs. For the most part it works but I found when trying to remove an ACL on modifying users objects the permission would not be removed...

View Article


Powershell Ise to ftp

Hello, i am on a school assignment with a project on powershell ISE. this is what we need to do. we have a FTP server on nas(lunix)  and we need to sync it with 2 clients(mine and my project partner)...

View Article

how to create mapped network drive in PowerShell (Running as an administrator)

HiUsing Windows Server 2012 R2 with Powershell 5 installed.Running PowerShell in a Non Elevated shell i cant run:New-PSDrive -Name g -PSProvider FileSystem -Root "\\vm01\share" -Credential $cred...

View Article

Script to remove domain users from local administrator group

Hi all, I am looking for a script to remove all domain users from local administrator group and add them to the Network configuration operator group.And also if anyone want the admin rights depend on...

View Article
Browsing all 21975 articles
Browse latest View live


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