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

Stagger Schedule Task Triggers

I'm trying to create a powershell script that will create scheduled tasks to reboot a list of servers weekly. I was wondering if there was a way to change the script so that when the scheduled tasks...

View Article


COM Interfaces

I have a third party COM server API that I would like to use in PowerShell. I can use it in C#/Visual Studio, the types are recognized. However in PowerShell I cannot make it work. If I use New-Object...

View Article


Logon rds application vs. Logon Windows Server GUI

Hi,I installed rds on a Windows Server 2016 and a Remote Desktop Application (exe)User are in remote desktop user group.The user is allowed to start an rds application through a rdp file from a client...

View Article

Issue with wildcard search in get-adcomputer

I am trying to perform a search for computers in my domain that end with lab## (ex/ lab02, lab03, etc) and I am having issues getting the filter to work. I can run the filter asget-adcomputer...

View Article

Get Stale Computer Records - Need help to improve the script

Hi Experts,First of all, i am beginner of power-shell and as per my understanding i wrote script by doing googling for one of requirement in my company, but i think it can be compact by reducing...

View Article


Adding an image as an overlay to an existing image

Hi All, One of my customers is looking towards adding a branded screen saver to their fleet. I have their corporate logo as a PNG with transparency. Rather than working with a fixed set of static...

View Article

Get output back from previous command in pipeline

I've been trying to get a output table sorted nicely but haven't found a good way of doing it. Maybe someone here already knows a trick to help? Get-VM can list a list of VMs.Get-VMHost can list what...

View Article

Browsing a webpage

My PS includes the following to get some data on the webpage. It stopped working but the webpage support IE7 and above. Is there a way to fix it ? Thanks.$ie = New-Object -ComObject...

View Article


Powershell VS sql DB2

hi folks, is anyone know any way how to query sql DB2 on Aix system Via Powershell?,10x

View Article


Delete files from specific folder and older than X days

Hello guys,I'm trying to create a script that searches and delete files older than 2 days inside 2 different Root Folders' subfolders with Specific name. So far, what I did is this script below, but it...

View Article

Not able to create folder inside C:\ClusterStorage

I ran this command as admin also but giving same error every time PS C:\WINDOWS\system32> mkdir C:\ClusterStorage\Volume1 mkdir : Access to the path 'Volume1' is denied. At line:1 char:1+ mkdir...

View Article

Help with more or out-host -paging

Hello,     I tried to use more or out-host -paging in my command in the PowerShell ISE, but neither of them working.For example the out-host -paging gave me the following error message PS...

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


Is -ea a parameter?

Hello,    I tried to understand what -ea is ? For example, I haveGet-Process $proc -EA 0     I know that $proc is a variable and its value is being passed to the Get-process.   I try to find what -EA...

View Article

access the mouse battery by powershell

HiI'm trying to know the battery status of a keyboard and a logitech mouse in order to be able to monitor it externally (zabbix). I can't find it for WMI. Any idea how to access the mouse battery by...

View Article


Using Icons in Powershell Scripts

Hi there.I am creating a powershell script that will execute a long job and I am referencing the "System.Windows.Forms.NotifyIcon" to show in the task tray when the script has finished. The issue I'm...

View Article

Any idea how to do with PowerShell 7 (.NET core 3)?.

Any idea how to do with PowerShell 7 (.NET core 3)?.  This code works with Windows PowerShell 5.1 but when I try to port this to PowerShell 7 (Preview 6) I get this error:Add-Type: (9,23): error...

View Article


Image may be NSFW.
Clik here to view.

Retrieving specific set of data from CSV file

Hi,As you can see in the screen shot above, there are 2 sets of data, 1 for Windows and 1 for VMware.What I want to do is to run a script that will only read the Windows Start to Windows End part of...

View Article

Appened to adjacent cell in CSV file

HI,I'm not great with powershell but it's what I know best so I'm trying to use it to do the following:I need to extract data like below from AD:$users = (import-csv "$path\users.csv").users Foreach...

View Article

How can I export and import client certificate using PowerShell script...

<Problem> I tried to install client certificate to client computer. But password error was displayed.  Procedure that I performed is following.  1. I exported the pfx file using PowerShell script...

View Article
Browsing all 21975 articles
Browse latest View live


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