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

Export to csv

I am trying to run a script and export the results to csv. The script runs fine onscreen but when the output is sent to the csv file the results for msDS-PrimaryComputer all return...

View Article


parseexact

Hi,I would like converting a registry value to datetime.In the registry, the value is: 08/20/2019 13:18:50With get-date, I get: 20 août 2019 15:30:57$test = '08/20/2019 13:18:50'...

View Article


For-Each Get-ADPrincipalGroupMembership - Get Computer Name to Export-CSV

How would i to get the AD security group name and the computer name for each on my spreadsheet. Right now I am only getting the group. Need the Computer Name. $Get2008s = "TEXTFILEPATHHERE" Get-Content...

View Article

ProviderName - Empty - win32_mappedlogicaldisk -

Group    What could be happening that the ProviderName is coming empty, the drive is mapped and I can even delete process and other mappings of the mapped drive?$ComputerName = "FGAND_COBRANCA" gwmi...

View Article

Using Add-Member and Export-CSV with a foreach statement will not update a...

Hi all, I'm working on a part of a script that collects the Monitors and their respective Serial Numbers attached to a computer and export it to a CSV file. Since I won't know the number of monitors...

View Article


Windows Powershell through Jenkins

Hi ,Please help me for resolving this : I need to run this script on Remote machine through Jenkins. Please re arrange this and help me.$newline = @() [Array]$computernames = $env:computernames...

View Article

error on all commands "Set-Location : The term 'Set-Location' is not...

HII am getting error on all commands executing in Windows Powershell (even CD\ command) below is the error:Set-Location : The term 'Set-Location' is not recognized as the name of a cmdlet, function,...

View Article

Extract characters from txt

Hello, I am new to powershell and I need to grab a certain part of a text from .txt file as:ip         location...

View Article


Variable Issue

Sort of new to powershell and having an issue with the below:Get-AppxPackage -AllUsers *Microsoft.Bing* | Export-CSV K:\Package.csv $Package = Import-Csv "\\ks-appsrv-02\apps$\Package.csv" | Select...

View Article


Using variables for the arguments in the Grant-SMBShareAccess cmdlet

The variable for the share was evaluated but the value of the variable represented by the share permissions was not. Is there a way to evaluate its value? Grant-SmbShareAccess -Name $SHARE -AccessRight...

View Article

Using Set-QADComputer for multiple computers in column A with properties in...

Currently using a script to set a property on a single computer works well, but now I have a list I need to set and do not have the time to do it manually for each one. Any help on a foreach and/or...

View Article

Image may be NSFW.
Clik here to view.

How can I pass the rename-computer credential in a powershell script (.ps1)?

Hello everyone,How can i give the password to "rename-computer" for the "-domaincredential" attribute in the powershell script,?There are no properties/methods like "-password" (eg image)I want the...

View Article

How to stop getting prompted to "Confirm"

Hello,I have some Windows Server 2008 systems that I'm trying to run a powershell script on to delete some temp files, but I keep getting prompted with "Confirm... Y [Yes] [A] Yes to All...... ect"  Is...

View Article


Move-Item using a file of destinations

I have a bunch of files I need to move from 1 source to multiple destinations. I have a file with the destination paths, but I can't seem to figure out how to use the file and get the items in the...

View Article

Set-ADObject $guid -Replace issue

Hello all!Kindly please for help - I have strange issue with PS script. Here is a small summary what it does: it creates CSV file from shared drive, update SQL database and when it is done it updates...

View Article


Getting files older than and then copying only those

Hi allI am trying to list all files that have not been in use for x number of days and then copy only those files from the original folder to one set by me. $CutoffTime = (Get-Date).AddDays(-825)...

View Article

Msft_Volume results: multiple records for 'D:'

Hello, Im getting some strange results for Msft_Volume queryGet-WmiObject -Query "SELECT * FROM Msft_Volume" -Namespace Root/Microsoft/Windows/StorageI see 'D' drive six times! I there any explanation...

View Article


HOWTO - hunt down all instances of a saved service account username ANYWHERE...

HiA behemoth of an application which I shan't name (let's call it VoleStrangler for the sake of convenience) has configured a gazillion websites, app pools, virtual directories, COM+ objects, DCOM...

View Article

identify which network drive was made manually

Hi,Is it possible with Powershell to identify which drive was not manually from the user instead by login script?Thanks,

View Article

How to check if windows store app is installed

We are dealing with annoying store app where it will install, but doesn't create any shortcuts (via SCCM).The idea I cam up with is to setup a 2nd copy as a dependency in SCCM so once the install...

View Article
Browsing all 21975 articles
Browse latest View live


Latest Images

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