Fazza Posted July 3, 2013 Posted July 3, 2013 Currently using SCDPM 2012 SP1 on a Server 2012 server. I've just added a Quantum Tapeload to the server which will be using tapes that already have data on them. To mark them as free you're supposed to use the script found here: MS Technet When running the script it prompts for the server name, library name and tape location. After entering this in we get the following error: Connect-DPMServer : The term 'Connect-DPMServer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\ForceFree.ps1:43 char:7 + if (!(Connect-DPMServer $DPMServerName)) + ~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Connect-DPMServer:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Get-DPMLibrary : The term 'Get-DPMLibrary' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\ForceFree.ps1:49 char:12 + $library = Get-DPMLibrary $DPMServerName | where {$_.UserFriendlyName -eq $Libra ... + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-DPMLibrary:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException C:\ForceFree.ps1 : Failed to find library with user friendly name kripke At line:1 char:1 + ./forcefree + ~~~~~~~~~~~ + CategoryInfo : NotSpecified: ( [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ForceFree.ps1 I'm not a PowerShell expert (yet) so need some help with this error please?! Thanks.
Fazza Posted July 3, 2013 Author Posted July 3, 2013 It seems to be an ID ten T error (change the ten to 10) or a PICNIC error on this occasion. I was running it in a standard PowerShell window and not the DPM Management Shell like I should have been! Oh well, leaving this here might help someone else having a 'senile moment'!! 1
MWR Posted November 25, 2014 Posted November 25, 2014 (edited) Thanks Fazza - just had such a senile moment (it was working earlier this afternoon and that shell crashed and I when I resumed, I restarted std powershell rather than the customised environment ...oops - bafflement terminated by Dr. Google). Back to this impoverished DPM environment that necessitates using PShell and then modifying the ForceFree.ps1 script template which is NOT marking Unknown/Un-labelled tapes 'Free'... p.s. After finding no debugging messages (I enhanced the provided script), I changed Write-Verbose to Write-Host but later found out why: "The Write-Verbose cmdlet writes text to the verbose message stream in Windows PowerShell. Typically, the verbose message stream is used to deliver information about command processing that is used for debugging a command. By default, the verbose message stream is not displayed, but you can display it by changing the value of the $VerbosePreference variable or using the Verbose common parameter in any command." Also, the required syntax is "Slot-n" rather than "Slot n" as the DPM console so kindly presents it :-( (yes that is in the -? help) p.p.s. How sneaky ! "$TapeLocationList -contains $media.Location" so the input list did not have to be parsed into a list. No way do I want to keep typing Slot-n, ...I guess I'd better split the input list :-) Edited November 25, 2014 by MWR footnotes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now