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

Powershell Patching Information: Problems using Export-CSV / looping

I've made a simple script that obtains patching information from a series of servers.The csv file I use to reference my servers is called patchlevels.csv and just contains some basic...

View Article


Access to the path '\\server1\c$\file1.csv' is denied.

Hi everybody,I'm trying to figure out what could cause the issue in Title. Still without progress.From Server1 I'm executing this code in powershell ISE:Invoke-Command -ComputerName Server2.domain.com...

View Article


Adding a file to each users Home Drive

AfternoonI have a directory with over 200 users listed within (it is their homes drive)i wish to place a file i have in each users home drive using powershellhowever i have the path...

View Article

Local Security Policy List

Hi,For the last couple of days I was looking for a powershell script to list secpol.msc -> Local Policy -> User Rights Assignments or Account Policy for a list of given...

View Article

Cant save excel file

$importcsv = Join-Path "$PSScriptRoot" "data.tsv" $xl = New-Object -COM "Excel.Application" $xl.Visible = $true $wb = $xl.Workbooks.OpenText($importcsv) $wb.SaveAs("data.xlsx")Im getting the error You...

View Article


Add-ADGroupMember : A referral was returned from the server???

I'm sure I'm missing something here...All I want to do is add a user from a child domain to a universal distribution group in a parent domain.  Sounds simple enough right?  WRONG!Here is the example...

View Article

Powershell Script to check the status of Autheticated Internet site

Powershell Script to check the status of Autheticated Internet site, (Which needs credentials) Script has to check, Site is working or not.

View Article

Exclude list of users from get-aduser cmdlet

Hello, I need to put some exclusion for my input dataLets say, I don't want to list "test01, test02, test03" users.I can write it likeget-aduser -filter * |?{$_.name -ne "test01" -and $_.name -ne...

View Article


Need to extract all users from an AD group and then pass off their...

Say I have an AD group called "group1" and I'd like to get all members and then pass off their UserPrincipalName (samaccountname + domain name) to another cmdlet, what would be the best method for...

View Article


Get-ChildItem directory only (not full path) on error output

Hello,I currently use the snippet below to check for folder permissions, it outputs a CSV file which details Category, Reason and TargetName. When I open my error.csv file I see the 3 columns being...

View Article

get-eventlog

I'm trying to read the last 7 days of relevant Security log entries on one of my DCs and I'm getting the following error. Is there a way to accommodate all the data that's being returned? I don't...

View Article

$ADSI.comitchanges() - A constraint violation occurred

Hi, I'm trying to manage OU permission using powershell, I have $ace object created using following command:$ACE = New-Object System.DirectoryServices.ActiveDirectoryAccessRule...

View Article

How can find internet explorer version

Hi Team,I am looking script which can find internet explorer version . I need to run this script among 1000 servers.can anyone help me on this .....?Regards, Triyambak

View Article


list members and properties from multiple AD groups

Hi - I need to create a csv that lists the members from multiple AD groups and for each member shows their displayname, username, distinquished name etcSo far I've got a script that lists members for...

View Article

Users and their AD groups listed

I'm new to PowerShell. I need to have an AD power shell script that can generate a .csv output with users and their AD groups.Any assistance will be greatly  appreciated.Thanks.Write-Output:  Person,...

View Article


Uninstall a sofware with registry uninstall string from Control Panel

Hi,I created that registry key (export from registry to reg file):Windows Registry Editor Version 5.00...

View Article

File copy from multiple server to a common repository share

Hi ,    I am looking for a power shell script that will copy content from multiple server and paste to a common share in a remote server .Requirements :Script should read from a file that contains...

View Article


Simply get computer name with serial number

Hi All,I use the script below to get serial number, but I have no idea how to get the computer name in the meantime.Pls point me.$File = [System.IO.File]::OpenText("d:\111.txt") while($Machine =...

View Article

Trying to create a script for a Backup - no success

Hello Community,This is my first entry here and I hope I´m doing it correct.My intention is to create a script which copies files from folder A to folder B automatic. every night. It should just copy...

View Article

Using Windows Search Index to search for PST files

Hi All,I have the following script that searches for PST files across all connected drives and lists them in a datagridviewfunction Get-PSTInfo {$statusbar.text = "Searching "$array = New-Object...

View Article
Browsing all 21975 articles
Browse latest View live


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