Quantcast
Browsing all 21975 articles
Browse latest View live

Problems with getting output to csv instead of text file

Hi, I recently started exploring powershell, thought i've been a fan of vba for a long time. So i found a script here for finding cluster resource status for one or multiple windows boxes which i found...

View Article


Help with windows powershell - reading text file & manipulating the data

Hello,I'm new to windows power shell & need your help/expertise in formatting the below *.txt file.Could you please provide me with a sample powershell script which can accomplish the below...

View Article


Listing ADusers with only listed properties. But ExtensionAttributes don't...

Im trying to make a csv file with all users and theyr most important properties. This works, but ExtensionAttributes won't show.Import-module Activedirectory $date = get-date $nicedate =...

View Article

Powershell Script to get "hidden" shared folder and NTFS permission from list...

Hi friends,I found a script here to get shared folders and NTFS permissions, but it is not working with "hidden" shared folders on Windows 2008. Is there a way to get those permissions ?Thank You!

View Article

Get-ADGroupMember -recursive Show Groupnames

I'm new to Powershell and im trying to get a list of the Members of some AD-Groups. Each Group is related to two other Groups for Read and Change permissions. Like FS101_EXAMPLE has two members wich...

View Article


Powershell - Forest.SetSelectiveAuthenticationStatus Method - Not working

I have written a script to create an Active Directory Trust. The trust creation works fine, but when I attempt to set the selective authentication it does not work.$SourceContext = New-Object...

View Article

Using setx.exe while using PowerShell Remoting

Hi,I am using the Invoke-Command with a Session to execute some installers on a remote computer. This works fine but for some reason setx.exe (to set Environment Variables) will not work as expected....

View Article

Set userpath to homefolder using powershell

I've created a partition " H:\ "  with several folders for different usergroups. One of these groups is ICT. When i run the following script the path for the users is set to the correct...

View Article


The term 'new-object' is not recognized as the name of a cmdlet, function,...

I have a script that runs well the vast majority of the time.  On occasion I get an exception.  I would appreciate any insight as to why it fails on occasion.  I can't understand why the new-object...

View Article


Image may be NSFW.
Clik here to view.

how to fix this is who in the picture ?

I use this script in server 2008 R2 for Storing Windows Event Viewer Output in a SQL Server table with PowerShell :foreach ($server in Get-Content c:tempservers.txt) { $variable = ( Get-EventLog...

View Article

Count mail items and get size of each in exchange 2003 mailbox?

I'm trying to get into a mailbox via powershell and see if: 1.  I can list all emails within the past year.2.  Get the size of each mail item.Anthony

View Article

Takes forever to pass the output

Is there anything wrong with these codes? I am trying to list the event ID 1074. It runs well locally but not on the remote pc. It takes more than 10 mins. Function whoshutdown($ComputerName = ".")...

View Article

Why does Invoke-Command fail with multiple-paramater command?

$robocopy = ("$env:SystemRoot\System32\robocopy.exe ") $source = '"\\MYSERVER\netlogon\MyFolder\MyStuff" ' $destination = '"C:\MyFolder\MyStuff" ' $options = "/MIR R:1 W:1 /XJ " $excFiles = '/XF...

View Article


Need to use variable Local Paths

Hello,I have a the following snippit, how can I add a variable to the bolded UNC path C:\TEMP\GPO\source\5\{231A178D-DC6C-4186-9575-9C64F07DA5B5}\gpreport.xmlThose paths will change a lot in my...

View Article

How to append data in xml

I have below script which will create xml with data.======================================================================# Set the File Name $filePath = "e:\Report2.xml"  # Create The Document...

View Article


Copy-Item using Windows PowerShell Multithreading?

Hello all,I need to figure out a way to copy a 500MB .zip file to about 400 servers in parallel. Until now, I have been using the ForEach () method. But, I'd like to use a parallel method so that I can...

View Article

Server2012: Set-ClusterScheduledTask + "Run with highest Priviledges" - ???

Hey there,I'm trying to fix a script we have to trim VSS copies on our Fileserver which is a Serve 2012 Failover Cluster. This has worked in the past, however I think it got messed up when I changed...

View Article


Powershell parsing question

Hi all,I'm trying to parse the below data and write it into a CSV file. I need to gather all the bolded data and the script that I have allows me to get the first 16 items (which is  exactly what i...

View Article

System requirments to using PowerShell's New-SmbShare cmdlet?

Can anyone tell me if there are system requirments to using PowerShell's New-SmbShare cmdlet?  I'm trying to create a script that will create the folder, create the share, create groups based on the...

View Article

PowerShell - Searching Excel and replacing text

Hi all,I am trying to figure out how to loop this script so that it replaces all the text that I am searching for in my Excel file.  I am able to get it to run but it only replaces the text in the...

View Article
Browsing all 21975 articles
Browse latest View live


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