Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [powershell]

Windows PowerShell is a command line shell and scripting language for Windows that supersedes the CMD.exe shell and batch language. PowerShell is also an automation engine for Windows that provides functionality similar to Windows Script Host and VBScript.

-1
votes
0answers
13 views

SSH'ing into DigitalOcean server via Windows 10

Can someone please answer a step-by-step guide regarding how to fix SSH'ing into Digital Ocean while on a Windows 10 machine. I'm doing something very wrong because it never works for me. My ...
0
votes
1answer
12 views

RSAT unavailable in Windows 10 - 1809

Since the October update of Windows 10 I'm not able to install RSAT. I have found numerus of guides telling me that this has been moved to feature on demand and I have tried installing following ...
-1
votes
0answers
13 views

Replacement for Ninite

I am the owner of a consulting business in the Netherlands, a lot of our clients have asked if we can set up their computers at home, so they need default virus protection and malware protection. What ...
0
votes
0answers
17 views

Task scheduler to run scripts

I Currently have a task scheduled to run a powershell script which in turn runs an Excel macro which processes some numbers and emails out a report. Until recently, it worked perfectly fine. I'm ...
0
votes
1answer
22 views

Saved SSH connections in Windows 10 PowerShell

I am trying to set up SSH connections in PowerShell to replace PuTTY. I am able to open PowerShell and connect using the command ssh mrpeanut@myserver.com -i .ssh\mrpeanut. However, I was hoping to ...
-3
votes
1answer
36 views

How to find license key with CMD or powershell without upgrading powershell to version 3.0

I have an issue cause I am trying to deploy a script which lists the major data of PCs, but unfortunately I cannot get license key of anything. All the computers in the company (except IT) use Windows ...
0
votes
1answer
24 views

Remotely logging a user into the console session?

I'm looking to remotely (preferably through PowerShell, but anything will do) log in a given user to the console session in Windows 10, ie, as if the user was sat at the computer and typed in their ...
0
votes
1answer
29 views

PowerShell tries to use a proxy even though I have none selected

When trying to run a script that tries to download something from the NuGet website, I get the following error: Preparing to run build script... Unable to find version '0.30.0' of package 'Cake'. C:...
0
votes
0answers
30 views

How to copy a different set of .csv files to multiple computers based on a particular value given in input file

I'm trying a script to copy a CSV File to multiple computers using Powershell I have 5 different CSV Files - 12.csv, 34.csv, 56.csv, 78.csv & 910.csv I have one input file like below with ...
0
votes
2answers
39 views

Powershell script how to silent supply values for the following parameter?

I have this script copying first month backup file from directory to another. This works fine but needs user intervention and not execute automatically. How i can silent this message ? Here is the ...
0
votes
0answers
26 views

How to install dbtools

I want to install on my Desktop dbtools utility. I expect that it will help me to explore SQL more .. I found reference to it at this location https://dbatools.io/commands/ I downloaded the package ...
2
votes
1answer
119 views

How to preserve timestamps for all folders when moving them from one NTFS drive to another?

I want to move a folder (containing many sub-folders and files) from one NTFS drive to another. Observation: I noticed when I do this, the timestamps ("creation date", "last modified date", etc.) ...
0
votes
1answer
42 views

Shift+Space not working in Powershell

Since updating to Windows 10 v1809, pressing Shift+Space no longer sends a space in Powershell v5. If I use an older Windows 10 station (v1709), Shift+Space sends a space. For example, I'm accustomed ...
1
vote
1answer
32 views

Remote Powershell Sessions randomly die

The Powershell code below is how I am starting the remote PSSession. $compName = "server1" $jobname = "admin_test" $cred = Get-Credential -UserName "DOMAIN\$env:username" -Message "DOMAIN\$env:...
-1
votes
1answer
30 views

How to find the Local Policy Security setting corresponding entry in Windows Registry? [closed]

I have a setting need to remote A group permission of "Remote Shutdown" in "Local Policy Security" settings. I try to add this in batching script or powershell script. How to find corresponding ...
-1
votes
0answers
22 views

I need to replace a whole sentence in script

Team , Am I need to replace a whole statement column to blank in below script , which it was in notepad . Please help me and suggest me any ideas . DWH_SRC_ID CHAR(4) not null title '...
-1
votes
0answers
18 views

To get Oracle Server version installed [closed]

I need help to find out oracle server version(not client) using Powershell. When I searched I got Powershell command to get Oracle Client version but not the Server version installed. Anyone knows how ...
0
votes
1answer
31 views

Invoke-command still using my PC as middle man during robocopy?

Can someone look at my code and tell me why when using invoke-command, that my PC is still being used as a middle-man? I'm trying to get the destination computer to transfer directly and not use my ...
0
votes
0answers
22 views

Need Power shell command to get update list

Need a power shell command by which I can extract all updates list installed for Microsoft application. Note: only updates installed for application, not windows updates list. which can get by hotfix. ...
0
votes
1answer
17 views

Show status when installing Anaconda with Powershell

When installing Anaconda with Powershell: Downloading. Invoke-WebRequest https://repo.anaconda.com/archive/Anaconda3-5.3.0-Windows-x86_64.exe -OutFile "Anaconda3-5.3.0-Windows-x86_64.exe" When I ...
0
votes
0answers
49 views

Running a long single line batch file containing files in a folder

I have a folder with over 2,000 files. I want to merge these files using a software called CloudCompare with the command line. The problem is that a single line cannot be over 8191 characters as per ...
1
vote
0answers
22 views

Need help writing a Powershell script to check 20 URLs(Web Application) , URLs loads in IE and get page response to a file [closed]

My Requirement: We have 20 different URLs(Web Application), we have to browse each URL in a IE browser and enter the user name and password . Same user and password for all 20 URls. We will check the ...
0
votes
1answer
42 views

power shell + how to capture the names in file before separator to variable

in file.info we have the following structure kdme:424324 fejwde:3425 kededmrf:132456 edkmedefrf:45 . . . how to set the variable - param with all names - kdme fejwde kededmr edkmedefrf expected ...
0
votes
1answer
29 views

power shell + match exactly the first field and capture the second field after separator

we have the following file ( files.sum ) the first field is the name of the file the second field is the seprator the thired feald is the sum configuration.txt:2327432786 config.csv:458349573 ...
0
votes
2answers
69 views

Powershell - Why can't use this variable in my script?

why can't use this variable in my script? i run script with parameter "Untitled1.ps1 -filePath C:\scripts\test01 -logPath C:\scripts" and result is step1 C:\scripts\test01 C:\scripts step2 C:\...
1
vote
1answer
40 views

'Get-WindowsFeature -Name Hyper-V' stucked on 20%

I have executed below command : Get-WindowsFeature -Name Hyper-V | Select-Object InstallState It got stucked on 20% I waited for 30 mins but still no response. Any specific reason and how I ...
0
votes
1answer
45 views

I used the Windows 'move' command to move a group of files of the same extension into a directory that doesn't exist

Using powershell, I moved a bunch of files into a directory that doesn't exist. move *.png E:\directory\that\does\not\exist It's a very trivial human error. But instead of having an error thrown ...
0
votes
1answer
48 views

Windows 10 search: how to preview the part of the file where the word has been found?

When I search the word "computer" on my folder that contains several .docx files, windows list the list of files which contains this word, which is good. But I would like to see more than the list of ...
0
votes
1answer
47 views

How is the conversion/cautions things from batch version of robocopy to PowerShell version of robocopy?

After some googling, majority of posts online talking about the goods of PowerShell, and the environment going to use robocopy is Windows Server 2016. Thus, an original batch file with two command ...
2
votes
1answer
55 views

How to set a customized and editable start menu layout using PowerShell on Windows 10?

I'm trying to set a flexible initial start layout for new users by running a PowerShell script after setting up their accounts. I can't enforce this through group policies because it wouldn't allow ...
-1
votes
1answer
50 views

PowerShell-Script to set windows date

I can't program one line in PowerShell (I'm a linux user...). For a dev PC/Server with Windows on it, I need it to be always on one specific date (1.3.2017). Because it's a vmware vm the vm-supervisor ...
1
vote
1answer
63 views

Find name of computer attached to same network

I have two PCs connected to the same network. One is mine and there is one other. I want to find out the Name of the other PC using the command line. Please note: There are only two PC's connected to ...
1
vote
1answer
47 views

Downloading files with Powershell

I'm currently trying to download an exe file using Powershell. This is the code that I've got: Invoke-WebRequest -Uri 'https://www106.zippyshare.com/d/2pyiUtIr/39887/SimpleHelp%20Technician-window ...
0
votes
0answers
11 views

What do people use to get a “hash” of a VM imported into vCenter to verify a successful upload?

I have a unique deployment of a large VMware environment and we are importing an OVA into the servers going to each of our sites. I did a quick search and could not really find anything related to a ...
0
votes
1answer
19 views

Extracting SharePoint data on daily basis

I want to export my SharePoint document library data on daily basis and csv file need to be save as naming convention as Dataname_yyyyMMdd. As per my below script, it need to export data from the ...
2
votes
2answers
57 views

CMD.exe immediately resizes on invoke

Anytime I use cmd, the window shrinks and snaps to the top left corner of my screen . This happens regardless of terminal emulator (Visual Code integrated terminal, CMDer, "run -> cmd", Powershell -> ...
0
votes
1answer
25 views

how to find out what are the other users connected to this server?

I want to change the installation of a program, but it says that there are other users connected to this server, how can I find out who they are? One way, as described by root in the comments below, ...
0
votes
1answer
55 views

Unable to get pnputil.exe to function in PowerShell script pushed via MS Intune

I've been struggling to get this script working via Intune for several days. The below is a script that checks to see if a printer is installed, if not, the driver is downloaded from our blob ...
0
votes
1answer
31 views

.TargetPath was unexpected at this time

I want to obtain the Target of all the shortcut situated in taskbar folder. I am running following code in .bat file @ECHO OFF FOR %%i IN ("C:\Users\kirti\AppData\Roaming\Microsoft\Internet Explorer\...
0
votes
2answers
59 views

How do I restore Windows 10 Start button functionality?

Although this question seems like a dupe of this and this, the accepted answers to those questions did not work for me. Those questions/answers are a few years old now, so my problem that happens to ...
1
vote
0answers
38 views

Cannot set WinRM TrustedHosts in Windows 10 [closed]

Running either of the following commands from an elevated Powershell on the local client: winrm set winrm/config/client '@{TrustedHosts="111.111.111.111"}' ## or Set-Item -Path WSMan:\localhost\...
1
vote
1answer
48 views

Truncate half of very large file

We've let a trace log run rampant on our productive system and it has grown to be nearly 50GB in size and caused the disk to run almost full. I've stopped the trace so the file won't grow any further. ...
-5
votes
2answers
114 views

what does this bat file do?

I found a file with the following content that was on the flash: File What coding does it use? How to decode it?
0
votes
0answers
27 views

Syntax highlighting for PowerShell on Linux?

With PowerShell on Linux (pwsh), is there a way to get syntax highlighting on the console in the same way that it works by default in the Windows console?
1
vote
2answers
96 views

Not Able to Replace Space with Character in Bulk Name Update

I have some images in a folder like van-map-PE 100-1.png van-map-PE 200-8.png van-map-PE 160-2.png van-map-PE 400-6.png Now I want to remove all spaces between PE xxx- and replace it with - like ...
0
votes
1answer
46 views

extract data from SharePoint document library to CSV using powershell

I am trying extract data of SharePoint document library to CSV file using powershell. I am getting data correct on CSv file. But one column i.e "Description" have more text data on it.So when run the ...
1
vote
1answer
18 views

Sorting output of Get-ADComputer efficiently

Powershell beginner here. I want to run a command in the terminal to list all the domain members of the specified domain with select properties, sorted by name. I have a domain with just under 400 PCs....
0
votes
0answers
22 views

Calling Documents.Open for Word.Application Error converting msoFalse to type Object

How can the Documents.OpenNoRepairDialog method be invoked by powershell with all the parameters supplied at least up to the point that word documents open without errors, dialogs, or macros; and that ...
0
votes
1answer
47 views

powershell script to list AD users that dont have access to a particular AD group [closed]

I need a PowerShell script that can list AD users who don't have access to a particular AD group.
0
votes
1answer
69 views

Hashtags are coming when export data to CSV file by powershell script

I am running a powershell script for getting data from SharePoint document library. While run the script, data came to csv file, but columns names are coming with ";#" hashtags. For example, names, ...