Questions tagged [powershell-v3.0]

For issues relating to Windows PowerShell, version 3.0.

Windows PowerShell Microsoft's task automation platform for Windows, and includes a command-line shell and scripting language. PowerShell was designed especially for system administrators.

Powershell 3.0 comes with Windows 8 and Windows 2012 as a built in package.

73 questions
1
vote
1 answer

Delete " from a file content

I am querying list of domain joined computers using powershell as below: dsquery.exe computer > "C:\testfolder\host.txt" Output is working as expected, but it is as shown below: "CN=WIN-20CCF3DC8D,OU=Domain…
serverstackqns
  • 764
  • 3
  • 16
  • 42
1
vote
1 answer

free disk monitoring windows 2012 - powershell

I have started from scratch to be able to learn how to monitor our server (only one). $dates=(get-date).ToString("s").Replace(":","-") $page="page"+$dates+".csv" get-wmiobject win32_pagefileusage | export-csv -path…
1
vote
0 answers

Manage UAG Server via WinRM

Does anyone know of there is a way to configure a UAG server to work with WinRM? We have a small number of servers and the "Server Manager" application as well as PowerShell are the way we generally keep an eye on our systems. This is not connected…
Robert Kaucher
  • 487
  • 1
  • 4
  • 18
1
vote
2 answers

"powershell has stopped working" on PS exit after creating IIS User

On a Windows Server 2012 box, I'm using PS to create a new IIS User (for automated deployments using MSDeploy). The command itself appears to work fine -- the user is created -- but as soon as I exit my PowerShell session (typing exit or just…
1
vote
3 answers

In PowerShell, how can I parse a preformatted output?

Is there existing tooling to take text-based output and pipe it to a dynamic object that can be queried as columns? Specifically, I'm invoking .. query session /server:MYSERVER .. which is outputting .. SESSIONNAME USERNAME ID…
1
vote
1 answer

PowerShell Remove-Item can't handle junctions

Windows Server 2012 using PowerShell to create a log file in the temp folder: $LogFile = $env:temp + "\MigrateMyDocs.log" Let's say one's script has already run and you want to delete the log file at the start of the script using something like…
Rob Nicholson
  • 1,707
  • 8
  • 29
  • 56
1
vote
1 answer

Hyper-V, Differential Disc, Changing path is resolving junctions - how do stop that?

Gives me a headache. I have a ton of differential discs. In order to move the machiens around - and because (Thank heaven) vm move does NOT copy the sources of differential discs (sadly export does), my idea is to have a central copy of all the…
TomTom
  • 51,649
  • 7
  • 54
  • 136
1
vote
1 answer

Why Get-SmbOpenFile losses the lock when file still opened at remote

I am using Get-SmbOpenFile, But surprisingly, it looses its connection and I can see that there is no lock even after couple of seconds later on the file any more, even it is still opened. I safely can remove that file on my server. Why, this can…
0
votes
1 answer

PS-Remote shell access to a user

I am currently adding Full control to an user manually. Please see below screen shot. But this needs to be done via a PS script.I followed…
0
votes
1 answer

exchange management shell script to find changes on mailbox?

I have a question to you.I have a mailbox account in my exchange server 2016 which is used a smtp address for while.and now, because of changing its alias and smtp address, is there a way to find the log of the mailbox via exchange management shell…
Ami
  • 15
  • 2
0
votes
1 answer

GWMI - Find out if Domain Controllers are physical or virtual via script

I have tried to create a script for extracting but the output is not quite I desired. $Servers = Get-ADDomainController -Filter * | Select-Object Name foreach($server in $servers) { $compsystem = gwmi -q "Select * from win32_computersystem" |…
Cranta Ionut
  • 179
  • 3
  • 4
  • 12
0
votes
1 answer

Printer Audit 64bit

I'm running the following script to get a report on installed printers : https://community.spiceworks.com/scripts/show/2186-export-printer-information-to-spreadsheet?page=1 However when the script is working it scans for the 64 bit driver retrieves…
JJJJNR
  • 870
  • 6
  • 20
  • 32
0
votes
1 answer

Difference between two powershell scripts

I received a script that is supposed to scan the event logs of 4 DCs, searching the event ID 4740 (user lockout). This is script number 1. Now I thought to myself, "Why scan all the DCs when I can scan the log of the DC that runs the role PDC…
0
votes
1 answer

My script does not go to the next server

I'm trying to retrieve eventlog (with certain conditions) from multiple servers. It only checks the first server and does not move onto the next one. What is wrong with it? I tried different scripts (This are my first scripts ever, I know they…
user312042
  • 83
  • 4
0
votes
2 answers

How to rename a non-AD computer remotely

I have the need to rename a non-ad computer that was just created with Hyper-V via Powershell scripts to a meaningful name before I connect it to the domain. I have the local username and password to that computer. I have tried Rename-Computer as…
billsecond
  • 199
  • 9