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

Need help in create TFS branch using Powershell

I need help in creating TFS branch using PowerShell. With this I am planning to automate the process of branching and merging of source code using PowerShell. Really appreciate if some one provide the...

View Article


Splitting a String with a Multicharacter Delimiter

Hello,I'm trying to split a string of text using a multicharacter delimiter, but the split method appears to only support a one character delimiter.  Is there a simple way to split using multiple...

View Article


Set-Acl permission failed

I am trying to set the permissions on a folder using the below code, However i get this error :-Cannot find an overload for "FileSystemAccessRule" and the argument count: "6".Functin...

View Article

Image may be NSFW.
Clik here to view.

Execute .ps1 script silently

Hi, I'm new to Powershell so please bear with me.  My .ps1 files are associated with Powershell.exe so when I run them from the command line they open up "Powershell ISE" and wait for me to press play....

View Article

[PSCustomObject] does not return all colums (Powershell)

HiExperts, I am new in powershell and I did copy/paste and adjusted code following code from internet to accomplish my need, please excuse me for asking silly questions if it so.I am just using...

View Article


Using command output as message in msg

Hi.I'm trying to use the output of a Powershell commands as the content of a message in msg.if I do:$TEST = 123 msg /server:mypc * "$TEST"I get the message box saying "123"However, when I do:$TEST =...

View Article

how to display deletion user list for a particular period along with...

how to display deletion user list for a particular period  along with directory path (last known parent) & deletion date via powershellKindly provide the same 

View Article

problems with null-valued expression error

I run my code that gathers certain parameters against multiple machines to create a report. I gather the parameters in a hashtable. Problem is when running the script against one of the machines which...

View Article


DSC Partial configurations failing when trying to update servers at the same...

Hi All,I have tried to configure the partial configurations for the set of servers.The nodes are configured as following:ConfigurationRepositoryWeb XXX-DSC-REPOS {ServerURL =...

View Article


Local security settings

I'm having trouble with getting local security policy settings through powershell . I need to take all security settings that can be seen in secpol.msc through poswershell in human readable format if...

View Article

How to exclude duplicate records while fetching the data from one file and...

Hi All,I have file name "old.txt". The file contains the following data.(with Duplicate records)I need to exclude the duplicate records where combination of 3rd and 4th columns are same and put it into...

View Article

Try not catching Drive_not_found

I was surprised that the below checking of a non-existing drive does not transfer control to the Catch area. Why is that?$DebugPreference = "Continue"                          try {    Write-Debug...

View Article

class ignores if/while bug?

HiSomething strange I encountered  if you put a class in a while/if that will not run it will get created?!if ($false) { 'How is this class get created if this line does not?' class Base64 {...

View Article


Help with Simple Find Dates with Regular Expression...need two digit year

Need some help with just a simple date finder that can do two digit years. I just want it exported to another file with the list of lines containing dates.The expression runs without error it just...

View Article

powershell 5.0.x and 5.1.x help not working

I have two different windows 10 systems - 1 has powershell 5.0.x installed and is essentially a plain vanilla windows 10 system. Help on that system doesn't work; e.g. if I do a help...

View Article


Reboot Servers in groups and wait until they are up then move to next group

Hello,I am trying to create a script and where i have a list of servers and group/sequence numbers.Csv file content:servername,Group Server1,1 Server2,1 Server3,2 Server3,4 etcWhat i need to do it come...

View Article

why Bash on Windows cannot run on the PowerShell ISE

CMD and PowerShell can run well

View Article


exchange 2013 powershell script to generate shared mailbox owners list

hi,exchange 2013 powershell script to generate shared mailbox owners list.can any one help?  tried with Owner parameter but it does not generate list with all shared mailbox details of ownersMD

View Article

find disk number with no FileSystemLabel?

Is there a way to find a disk number where no drive letter or file system label is assigned to it in Powershell 5.  the get-drive command does not give label nor drive letter.  the get-volume command...

View Article

Rename Computer using Powershell fails with cannot establish WMI connection

I am trying to rename computer using powershell script which takes remote session of DC controller and tries to rename computer.Script is failing with error - "Cannot establish WMI connection to...

View Article
Browsing all 21975 articles
Browse latest View live


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