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

clear some content within text file and keep original file as it is

Hi Guys .. I am new to power shell. I am working on one task. 1) where I have to clear the content of text file ( not to delete text file) .2)  I have to clear or delete some part of content within...

View Article


Curly brackets in variables

Hi guys, here' my problem:Get-DhcpServerv4OptionValue -ScopeId 172.19.1.0 -all -OptionId 132 | Set-DhcpServerv4OptionValue -ScopeId 172.19.2.0 -Value {0x35, 0x35, 0x32}work just fine from the...

View Article


Solved - How to take ownership and change permissions for blocked files and...

Hello, I was trying to take ownership & fix permissions on Home Folder/My Documents structures, I ran into the common problem in PowerShell where Set-Acl & Get-Acl return access denied errors....

View Article

Error running powershell workflow via workflow application - Could not find a...

Hello,I have rehosted workflow designer. My machine is running Windows 7 sp1 . I  have downloaded and installed powershell 3.0 . I added the Powershell management activity and created a sample workflow...

View Article

Updating my script to add in the Name of the VM in VMM

Hello,I run the following script from our VMM server and it's working well in that it gives me the location of the folder where the VM lives and whether or not the VM is fixed or dynamic (or a...

View Article


Image may be NSFW.
Clik here to view.

Try and Catch...

hi allcant figure out why the Try and Catch option is doing well in the second example but not in the first....

View Article

Image may be NSFW.
Clik here to view.

[(I)nternet(C)onnection(S)hare] Internet -> Intern works, Intern -> Intern...

Hello,i have this network at the moment.Host Public IP: 84.84.84.84 Host Internal IP: 192.168.1.1 Hostname: server.example.org (Windows Server 2012 R2)VM Web Internal IP: 192.168.1.2 (Hostname:...

View Article

Image may be NSFW.
Clik here to view.

Try and Catch...

Hi all cant figure out why the first example is doing well but not the second one...

View Article


How do I collect and store data locally after script runs remotely using PS...

Hello,The intent of the code below is to get the file versions of 2 DFS modules on my domain controllers and store the information in a file locally.  So the script below runs on each DC and saves the...

View Article


Count Unique EventData elements from Windows Event Log

$global:imagenames = @() $Events = Get-WinEvent -LogName Microsoft-Windows-Sysmon/Operational ForEach($event in $Events){ $eventxmldata = [xml]$event.toxml() $EventData =...

View Article

Image may be NSFW.
Clik here to view.

/How to call a function in another PowerShell script

Hi All,I want to use dot-sourced method to call the function from other script,While calling Function.ps1 from the second script there is a Null value in the beginning, How can we ignore this null...

View Article

can we provide tab completion for windows features name in powershell cmdlets

hi friendsin powershell v2.0 of big trouble is that when we use add-windowsfeature cmdlet, we are forced to type the name of roles or features completely manually & autocompletion (tab completion)...

View Article

I need a powershell command to replace unicode chars in a file name to a...

Can anyone provide me with a powershell command which will search and replace a specific unicode character in a file name to just a blank space?Thanks

View Article


How to call consective powershell scripts as scheduled task

I am looking for some help with scheduling Powershell scripts we use for manipulating mail contact records.The scripts (commands) all work perfectly when run manually, but I am having trouble trying to...

View Article

Script to delete files created on a specific date with sepecific name

Hi,Is it possible to help me with a powershell script that delete files under a folder and subfolders that have the following attributes1. have the name (default.*) and (index.*)2. created on a...

View Article


Cannot save xlsx file from powershell

Hi.My problem is that I cannot save xlsx file that is created by ps script. Last string drop errors: Microsoft Excel cannot get access to file: C:\Users\PROFILENAME\Desktop\67E69410 This file is...

View Article

Specifying "Accept wildcard characters" for a parameter in script functions...

Hi,The output of help Get-Item -Parameter path shows that the parameter accepts wildcard characters:-Path <String[]> Specifies the path to an item. Get-Item gets the item at the specified...

View Article


Which PowerShell version is right for Windows XP x64 SP2 ?

System : Windows XP Pro x64 version 2003 SP2I'm going to install Power Shell on this Machine. However, I do not know which version is OK for this system. Some article has no way for Power Shell 2.0 on...

View Article

searching multiple xls docs with powershell

Hi, I have a folder structure with many excel docs that I am looking to search and return the matching row data alongwith the file location and sheet information. I have the basics now, but cant seem...

View Article

The WinRM service is not listening for WS-Management requests

Help! I just started having problems running remote power shell and using mapped drives as a remote administrator. I have two computers on the same local network, one a PC developer machine (GIGAPC),...

View Article
Browsing all 21975 articles
Browse latest View live


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